Support » Fixing WordPress » Query by current post taxonomy term

  • Hi,

    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?


Viewing 2 replies - 1 through 2 (of 2 total)
  • Oh and I need to exclude the current post from the query

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Query by current post taxonomy term’ is closed to new replies.