Support » Fixing WordPress » How to get Tag results into a page

  • I would like to know how you get the tag results into an existing page.

    Say you have a blog on cats. You write about all sorts of cat news but you’ve created a few individual cat pages to hold static content, facts about a particular breed.

    But you also tag alot of the news posts you do that relate to siamese cats with the tag “siamese”.

    It would be great to be able to add these tag results into the bottom of that static page on siamese cats so that you also get all that dynamic content from your posts that relate to siamese cats.

    I thought this might be a simple adition of one line of php. But I can’t figure out how to achieve it or really where I should be looking.

    Has anyone already achieved this?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Look at the A Page Of Posts example and use the argument ‘tag__in’ for the WP query $args.

    Thread Starter Dave333

    (@dave333)

    Thanks MichaelH,
    I’ve read through those links and created a pageofposts.php template.

    I’m finding it really difficult to understand the directions in that second link though. Are you sure this can be used to achieve the page / tag results combo described in my opening post?

    Would you mind explaining a little bit more how I use this template to achieve that?

    I’m not sure how one template can be used to create each cat breed page as each would need to contain a different argument. So I’m assuming I need a template for each cat breed, that’s OK if need be.

    Also, the cat tags I have set up do not have number ID’s associated with them, they are instead just “siamese”, “burmese” etc.

    From the experimenting I have done so far it seems that even if I could get this working it looks like it will display the complete posts I have made on, say, “siamese”, instead of just the heading and first few lines that you usually get in the results after clicking on the “siamese” tag.

    I appologise in advance if these questions seem a bit dense but I just need a little bit of extra help understanding how to go about using this template.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get Tag results into a page’ is closed to new replies.