WordPress.org

Support

Support » Plugins and Hacks » Remove parent terms from custom query

Remove parent terms from custom query

  • I have a custom post type called people and my taxonomy is city. i’m using this code (see below) on my taxonomy-city.php to view all people in that taxanomy sorted by their term. As it is now it lists all terms in people. I would like to sort it so if i’m on a parent term only the child terms of the current term will be listed with their respective posts. For example if my city is new york i want it to list people under manhattan, brooklyn, queens etc.

    a bonus would be if it could be achieved with pretty permalinks like mysite/post-type/term/child-term/post in my example it would be mysite.com/people/new-york/manhattan

    here is the code

    [code moderated – please use the pastebin]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Remove parent terms from custom query’ is closed to new replies.
Skip to toolbar