Get count of wp_list_pages, check if results
-
I got this to show 2 levels deep of subpages of the current page. But I need to check if there is any in the result before displaying. I have other things that get displayed that I dont want to show next to the list if there isn’t any pages in the list. Will I just have to write my own query to get a count and echo nesting loop? I like the nesting of the list items.
<ul id="nav-subpages" role="navigation"> <?php wp_list_pages('child_of='.$post->ID.'&title_li=&depth=2'); ?> </ul>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Get count of wp_list_pages, check if results’ is closed to new replies.