Add to a page an automatically generated list of posts with specific tag

Community Forums Forums Design Tips and Tricks Add to a page an automatically generated list of posts with specific tag

This topic is: not resolved

This topic contains 4 replies, has 2 voices, and was last updated by  tarax69 3 months, 2 weeks ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #112839

    tarax69
    Member
    Post count: 2

    Hi, I’m new to customization of WordPress sites. I have setup a couple of sites myself on a hosted web server. I run Genesis, with the Metro Pro Theme. Not sure if any of that is even relevant for my question which is:

    Is it possible to add code on a page to automatically list all posts with a certain tag? Let’s say some of my posts are tagged with ‘japan’, and on a page I want to have a list that is always up to date showing an alphabetically sorted list of links to all my posts concerning Japan. If at a later stage I add another post tagged ‘japan’ I want that new post to automatically be listed as well.

    #112847

    braddalton
    Participant
    Post count: 10202

    Yes. Create a new WP_Query and hook it in using the genesis_content hook or hard code it into a template.

    Or you can simply use the built in tag archives so all you need to do is tag each post with japan like a category archive http://my.studiopress.com/themes/metro/#demo-full


    #112850

    tarax69
    Member
    Post count: 2

    Thanks Brad! Any chance you could provide a simple example of how I would add a WP_Query using the genesis_content hook on a page?

    Right now, since I am new to this, Googling it simply overwhelms me with too much info, and it is hard to find the right place to start.

    #112851

    braddalton
    Participant
    Post count: 10202

    Like this http://wpsites.net/wordpress-tips/display-a-list-of-posts-in-specific-category-in-any-theme/

    But if you want the entire page to list all existing and future posts tagged with one specific tag, there’s no need to do anything.


    #112856

    tarax69
    Member
    Post count: 2

    Thanks. I’ll have a go at it :-)

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.