Skip to content

feat: update template basis#156

Merged
Levdbas merged 1 commit into2.xfrom
feat-update-template-basis
May 14, 2024
Merged

feat: update template basis#156
Levdbas merged 1 commit into2.xfrom
feat-update-template-basis

Conversation

@Levdbas
Copy link
Member

@Levdbas Levdbas commented May 2, 2024

Related:

Issue

Since the creation of the starter theme a lot has happened in PHP, WordPress and Timber. I want to make the starter-theme a more modern starting point for custom theme development.

Especially the base.twig and the need for the header and footer bothered me.

Solution

This particular PR focusses on removing the need for the header.php and footer.php by calling the proper actions from the twig files. While working on the base.twig I renamed html-header.twig to head.twig, moved some code tags around, removed some obsolete tags and made it overall a better starting point.

Impact

people coming from older versions of the timber-theme need to recalibrate a bit on how to work with this new setup.

Usage Changes

No

Considerations

I also removed some strange code blocks that, in my opinion, were distracting. For example the top

{% block html_head_container %}
{% endblock %}

has been renamed and the the inner block has been removed. We could move that block to the head.twig file if needed. But if you are customizing the theme in such a way, you know what you are doing and can probably do it yourself?

Testing

no

This commit removes the need for the page-plugin.php file and overhauls the base.twig, head.twig and footer.twig
@Levdbas Levdbas merged commit 55fa10a into 2.x May 14, 2024
@Levdbas Levdbas deleted the feat-update-template-basis branch May 14, 2024 07:40
@Levdbas Levdbas mentioned this pull request May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify header/footer usage

2 participants