WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Which template does the tags page use? (4 posts)

  1. jatinst
    Member
    Posted 5 years ago #

    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 http://127.0.0.1/wordpress/?tag=climatology 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?

  2. leadandfollow
    Member
    Posted 5 years ago #

    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.

  3. jatinst
    Member
    Posted 5 years ago #

    Hey,

    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.

    Thanks!

  4. Dgold
    Member
    Posted 5 years ago #

    It follows the template hierarchy for Tags.
    http://codex.wordpress.org/Tag_Templates

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic