Support » Fixing WordPress » Add Loop to Show Posts with a Specific Tag

  • Here’s what I’d like to do: At the bottom of each of my posts, I’d like to specify a particular tag to use to pull a sort of mini-archive, showing the permalinked titles with excerpts for all the posts of that tag I’d specified.

    I have reviewed all the related post plugins I can find, and none seem to allow this kind of functionality, specifying a term to query for each post.

    If no results are found for the specified tag, I’d just like nothing to happen, as if nothing had been searched for.

    I have reviewed much material in the Forums and Codex on multiple loops and query_posts and other related items, but I can’t figure out a simple way to do this. If only query_posts had an option to display excerpt instead of complete post body, I think I’d be all set, but it doesn’t. So I need something else.

    It would be great to be able to specify the post-specific-to-be-queried tag in a custom field in the post so that the same exact code could be used across all posts via an execute PHP plugin or, alternatively, just integrated once into the single.php template.

    Finally, it would be great to exclude the current post itself from the results.


  • The topic ‘Add Loop to Show Posts with a Specific Tag’ is closed to new replies.