WordPress.org

Ready to get started?Download WordPress

Forums

Get second level terms of custom taxonomy (1 post)

  1. adige72
    Member
    Posted 1 year ago #

    I want to get second level terms of a specific parent (first-level) term in a custom taxonomy. Sounds complicated but would be useful.

    Term 1
           SubTerm-1.1
           SubTerm-1.2
               SubTerm-1.2.1
        Term 2
           SubTerm-2.1

    Say, if SubTerm->parent is Term 1's id, then i want to output SubTerm 1.1 and 1.2 but not 1.2.1.

    wp_list_categories(array('depth' => 2, 'taxonomy' => 'customtax')); is not i'm looking for as it lists terms with their links, which i dont want to, and there is no filtering option by SubTerm->parent id.

    So how to achieve this?

Topic Closed

This topic has been closed to new replies.

About this Topic