• I have custom post types as ‘article’, ‘report’, ‘white-paper’, ‘publication’, ‘video’.

    I have custom taxonomies as ‘industries’, ‘services’, ‘writer’, ‘person’, ‘topic’.

    I have a category as ‘thought-leadership’.

    I want to get all terms related to the particular taxonomy from all posts under any of the above post types onto the template page for ‘thought-leadership’.
    i.e., I want to show 5 select boxes on the template page for ‘thought-leadership’ – 1 select box for each taxonomy. Each select box should list down terms from posts for any of the above mentioned post types and marked in the category ‘thought-leadership’.

    e.g:
    If I have a post from article post type and I have a term called ‘Automobile’ for the ‘industries’ taxonomy.
    Then I add a post from report post type and I have a term called ‘Energy’ for the ‘industries’ taxonomy.

    The the template page for category ‘thought-leadership’ should have ‘Automobile’ and ‘Energy’ in the select box for ‘industries’ taxonomy.

    Based on the term selected from the select box, the posts lists should get updated.

    Would be great if someone could give me a query for this and tell me how to refresh the page and display the posts according to the term selected.

Viewing 1 replies (of 1 total)
  • I often find, when trying to build dynamic post-type/taxonomy relations like this, the best way to figure the spaghetti mess of relations is to write out the code comments for the code first, then fill in the code based on the comments.. your explanation above is very verbose: after two attempts I was unable to make sense of it.. if you can provide something like this:

    #post-type: article
    #term: _____ #tax: _______
    
    // get current _____
    
        // get all ____ from ____ 
    
               // get _____ with ______

    sorta thing, I may be of more help.

Viewing 1 replies (of 1 total)
  • The topic ‘Get Terms Related to Terms and Categories’ is closed to new replies.