Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update template basis #156

Merged
merged 1 commit into from May 14, 2024
Merged

feat: update template basis #156

merged 1 commit into from May 14, 2024

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
4 of 9 checks passed
@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