0

I want to modify the "Posts" template. But I can't find it's location, I believe it's unrelated to my theme. Where is it located? Could I copy it and create an identical template in my theme so as to not mess around with the original?

2 Answers 2

1

Posts (note the plural) template does not exists.

The archive of standard post type, when is not a more specific template (date archive, author archive, taxonomy archive) is handled by:

home.php (and if this file doesn't exist) by index.php.

If you intend Post (note the singular) the right template file is single.php

Once understood this, to modify the template follow @JMau answer: create a child theme.

Edit

the informations above are not a secret, but are fully accessible in the Template Hierarchy page of Codex as @hereswhatidid says in the comment below.

2
  • 1
    Also, I would highly recommend reading through the Template Hierarchy page on WordPress.org:codex.wordpress.org/Template_Hierarchy Commented Aug 20, 2013 at 13:53
  • +1 from me, I forgot to add the link in my original answer. @hereswhatidid
    – gmazzap
    Commented Aug 20, 2013 at 13:57
0

You have to modify a file called single.php. You could set up a child theme to not mess with the original theme.

This technique is the safest and easiest way to modify an existing theme. Basically you create a theme that inherits from the parent theme. It's good for maintenance when themes (parent theme here) are often updated.

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.