• Is there a way to see which template is being used when a page is rendered. I’m trying to manage categories using.. Template Hierarchy.. category-2, category-3, ect… but it always seems to default to my base category.. I think.. does anybody know if there is anything tricks I should be on the lookout for on this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter sithicus

    (@sithicus)

    Basically what i’m saying is that my template hierarchy isn’t working.. but I think it should be.. I feel like I must have done something really silly.. do I need to make it a template with the tags at the top also.. or just change the file name…?

    Just in case, here’s the documentation: https://codex.www.ads-software.com/Category_Templates

    As far as how to confirm the correct one is being used: Why not, for testing, just add a scrap of xml to each category template? Perhaps
    <h2>This is category1.php </h2> towards the top of the template file?

    Use the global variable $template. You can echo $template inside an html comment.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘A way to see… which template is being used.. in the source?’ is closed to new replies.