Support » Everything else WordPress » Tags – Listing related tags in a Page

  • I am probably using tags wrong from their intended purpose and probably why I can’t find the answer I am looking for – but please bear with me.

    Background: I run a hobby blog. I have used a different category for each project I am working on – so that others may just find related posts on that particular project if they are so interested. I have migrated the projects to being tags with 2.3.

    Problem: I would like to create a page that when the specific tag is clicked in the post, it goes to the page that has a current photo of the project, the table of the project bars (using the plugin wp-Table), and then a listing -title only -of the posts.

    Is this even possible? Any assistance would be greatful!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    With WordPress 2.3, when you click a tag, WordPress pulls up all the posts with that tag into a normal Loop. This is not much different from how it handles (and has always handled) categories.

    Just like you could make category archive pages (named category.php), you can make tag archive pages (named tag.php).

    Does that help, or do you still need more information? I don’t know your level of experience with theme editing.

    I am sorta new on the whole template thing but I think I understand where you are going – but let me say what I think it is, and you confirm or correct —

    I can make a page template named tag.php and then when I create my page I use that template. I am kinda lost after that – but will try to see if I can make a template.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    I can make a page template named tag.php and then when I create my page I use that template.

    Not quite where I was going.

    Okay, with WordPress themes, you can indeed make Page Templates. But there’s a bunch of built in templates too. Like single.php, for example, is what is used to show Single Posts. category.php is used to show categories. All of these fall back to the main index.php file in the theme when they are missing. You don’t need to make any Pages for these to work, they just work based on what you are trying to view.

    tag.php is another one of these built in templates now. When you pull up posts by tag, it looks for the tag.php file and uses that. If there is none, it falls back to index.php. So you’re not making a Page, you’re making the Tag Template.

    That make any more sense?

    I guess I understand, but am sorta lost. I know, clear as mud. I saw something about this last night, but can’t find the page now.

    I think I got it now –

    but instead of the category-#.php, use tag-#.php and then it
    will go down the hierarchy if it is a tag that does not have a specific one.

    now my next question is – where do I find my tag numbers or do I use the tag slug?

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    You don’t use tag numbers, you use the tag slug. If the tag is “sometag”, then you use tag-sometag.php.

    And the “tag.php” is the default one if you don’t want to use a specific tag one.

    Thank you – one last question – how do I make the posts show up as a list rather than excerpts or full posts?

    Modify The_Loop on your tag.php page to not show the_content or the_excerpt for starters.

    While this solution works, it is not working for my particular problem. I need a way to list related posts from the tag on my Page that I create. Also, I would like when you click on the tag link in the post, that it will go to that page that I create. The plugins I am using for the gallery photos and the table will only work on Pages.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Tags – Listing related tags in a Page’ is closed to new replies.