Remove parent terms from custom query (2 posts)

  1. freppo
    Posted 4 years ago #

    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]

  2. freppo
    Posted 4 years ago #


Topic Closed

This topic has been closed to new replies.

About this Topic