Support » Themes and Templates » Which template does the tags page use?

  • Resolved jatinst


    Hey, am sorry if I missed something, but I just couldn’t find anything related with my searches on the forums.

    I am using a custom theme for a website I have made. And it uses a “leftcol” and a “rightcol” division, the class=”narrow column” and other styles have been removed.

    everything else is working great, but where can I change the template used by the url, basically..what page template does the “?tag” go to?

    I don’t see any page in my theme folder that has the narrow column stuff used by the page that is generated, i have changed the “page.php”, and single.php to match my theme, so..which page do I have to edit to make sure when someone clicks on any tag, he doesnt go to a page without a proper layout?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I think archive.php is used for tags, categories, and date archives.

    One thing you can do is view page source and that might be easier to match the html to php files.


    Yeah- that was really stupid of me, thanks anyways, I forgot to change the archive.php file on the server, and since this was the only link that used that template, i realised it now.


    It follows the template hierarchy for Tags.

    The Template Hierarchy specifies that WordPress will use the first Template file it finds in your current Theme’s directory from the following list:

    1. tag-slug.php
    2. tag.php
    3. archive.php
    4. index.php

    This tells us it defaults to archive.php if you do not have a tag.php so the better way to control your tag pages is to create and modify tag.php (perhaps by first copying archive.php) that way you can have tag pages with a layout that’s different from other archives like date archives.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Which template does the tags page use?’ is closed to new replies.