Hello Friends
I have the following code to list all terms, but I need a code where I can list only "parent terms" as they all have child terms too
Hello Friends
I have the following code to list all terms, but I need a code where I can list only "parent terms" as they all have child terms too
get_terms() has the 'parent' parameter:
http://codex.wordpress.org/Function_Reference/get_termsparent
(integer) Get direct children of this term (only terms whose explicit parent is this value). If 0 is passed, only top-level terms are returned. Default is an empty string.
I did try but didnt work
Can you look at my code and tell me where to add?
You must log in to post.