Is there Sub Cats/Page?
OK, I’d SWEAR I’d seen this, but now I can’t find it. When on a page or viewing a category, is there a way to know if there are sub cats/pages under the current one? If I call wp_list_cats or wp_list_pages and set the child_of parameter and there aren’t any children, I get the dreaded “Warning: Invalid argument supplied for foreach() in…” error. Soooo, I want to know if it’s possible to know if there are children….
I’d swear I saw a set of functions like “has_child” or something like that…. but can’t find it… and the searches don’t return any results. So I’m left to wonder if I’m crazy or not.
- The topic ‘Is there Sub Cats/Page?’ is closed to new replies.