I have created a few Post Format Templates Files. format-aside and format-audio etc. At present, I am using <?php get_template_part (‘format’,get_post_format()) ;?> to call such Templates.

In an organisational effort, I am looking to place all of my Post Format files, into a folder, entitled post-formats and then call each Post Format, using the following entry:

<?php get_template_part (‘post-formats/format’,get_post_format()) ;?>

Whilst this works, I was wondering if this was seen as bad practice. Is anyone aware of any issues this may concern, such as affecting WordPress' fall back/hierarchy system?

1 Answer 1


In general, "bad practice" is so common in the wordpress ecosystem, you will have to do something really bad for anyone to actually signal you out for doing it ;)

If you are the developer and maintainer of the theme, you should develop it in a way which will be easy for you to maintain in the long run, regardless of what other people's preferences are.

If someone else is going to maintain it, keep as much as you can to the structures used by the core themes. That said, in this specific case, even if they don't do it this way, it looks easy enough to understand by anyone that had ever worked with wordpress themes.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.