• Resolved parakeet

    (@parakeet)


    See https://developer.www.ads-software.com/themes/basics/organizing-theme-files/

    I notice the use of templates doesn’t necessarily align with WordPress’ suggested files-and-folder structure guidelines.

    Namely, the storage of template include files in dedicated directories.

    The separation of include parts from the theme’s single top level is useful. It is a nice idea to use the top level only for standard template-hierarchy pieces – not for entry-content.php etc.

    Whilst this is not mandated, WP says its Twenty* themes show “best” file structure.

    Would it be useful for you to follow this?

    Well done!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Bryan Hadaway

    (@bhadaway)

    I think you’ve listed all the reasons why people like BlankSlate. The point of BlankSlate is to be simple. Everything is easy as pie to see, find, and understand.

    Some themes are “organized” too well, to the point that people have to dig around to try and find what file they need to edit.

    WordPress is currently going through some wild changes right now, and not everyone is on board:

    https://www.ads-software.com/plugins/classic-editor/
    https://www.ads-software.com/plugins/classic-widgets/

    Also, keep in mind that the latest default theme, Twenty Twenty-Two, is completely unrecognizable from what are now also being referred to as “classic” themes.

    Some people like the changes; most people don’t. I guess what’s beautiful about WordPress is that there are so many endless choices, depending on your preferences and needs. I’m not sure exactly what you need, but if you’re looking for something like BlankSlate, but that follows WordPress’ opinion on how everything should be structured, you might like:

    https://underscores.me/

    Thread Starter parakeet

    (@parakeet)

    Thanks for the chat.

    Definitely wasn’t suggesting you should follow with all the complexity of those other approaches. Just interested that, given that you do have files entry-*.php and nav-*.php, these aren’t in a sub-folder.

    I haven’t yet used BlankSlate. Knowing the main/score template files, I did a slight double-take to consider what those entry-*.php and nav-*.php could be…

    I think when I do, I will adopt some sub-foldering for template parts. But then, as you say, that’s the beauty of choice ??.

    Take care.

    Theme Author Bryan Hadaway

    (@bhadaway)

    I don’t hate sub-folders or anything, but originally, the project was so simple that there was no need for them. There wasn’t any CSS, JS, images, many templates, and no template parts at all.

    The theme evolved a little bit over the years, but keeping everything in the root folder just stuck.

    I’ve actually considered getting rid of the template parts altogether because it’s potentially an unnecessary complication, but I’m very cautious about fussing with it too much because of the way people use BlankSlate, the potential to break stuff is abnormally high.

    I did demonstrate my desire for consolidating in another theme though:

    https://www.ads-software.com/themes/quiet/

    And then I also have themes on the chunkier side where I probably should organize the template parts into a sub-folder:

    https://www.ads-software.com/themes/publishers/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adhere to WordPress theme structure best practice’ is closed to new replies.