Ready to get started?Download WordPress


Query by current post taxonomy term (3 posts)

  1. robmuzo
    Posted 2 years ago #


    I am trying to do a custom query based on the current posts custom taxonomy term.

    So I first need to get the taxonomy term of the current post and then query all posts from that taxonomy term.

    So something like:

    $term = get current post taxonomy term
    query_posts( 'term=($term)' );

    Any ideas?


  2. robmuzo
    Posted 2 years ago #

    Oh and I need to exclude the current post from the query

  3. robmuzo
    Posted 2 years ago #

    Forget that I have realised that approach will not work.

    Anyone got a good approach to have a custom taxonomy page?


    Page title
    Page Desc

    List of all posts in related taxonomy term

    Really what I am after is a related taxonomy term select custom field on the taxonomy category page.

Topic Closed

This topic has been closed to new replies.

About this Topic