Get Bottom Most Level Taxonomy Terms?

How can I get the bottom-most level terms for a custom taxonomy?

Taxonomy Hierarchy example,

Custom Taxonomy: “product-category”

Top Level Terms -> Second Level Terms -> Third Level Terms -> Bottom most Level Terms

I want to get only Bottom most level taxonomy terms. I want to get this on out of the loop on index.php page, so setting parent id is not possible in get_terms() function.

Read more here:: Get Bottom Most Level Taxonomy Terms?

Leave a Reply

Your email address will not be published. Required fields are marked *