WordPress.org

Ready to get started?Download WordPress

Forums

Remove parent terms from custom query (2 posts)

  1. freppo
    Member
    Posted 2 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
    Member
    Posted 2 years ago #

    anyone?

Topic Closed

This topic has been closed to new replies.

About this Topic