Permanent Tourist

The personal website of Mark Howells-Mead

Using WordPress template parts for my new WordPress theme

Work is ongoing on the technology behind this website. (As always!) The most recent change which will only interest WordPress developers is that I’ve split the original (largely) single PHP file into individual template parts, in line with the standards laid out by Underscores.

This means that the Sherborne Road WordPress theme is slowly moving in a direction which will make it useful as a parent theme and as a cleaner basis for new themes.

Moving individual parts of the template into individual files has the advantages of simplifying the code structure, taking advantage of template inheritance hierarchy for different post types, and making each part of the site an individual module, allowing for easier re-use across other themes.

Developers can check the changes in the latest commit to the theme’s Github repository.

Leave a Reply

Your email address will not be published. Required fields are marked *

For security, use of Google’s reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

This site uses Akismet to reduce spam. Learn how your comment data is processed.