Okay so here is the problem. I have this code to hide the list unless a child cat is present – works great thank you guys for that! But is it possible to hide even the containing div? Cuase as of right now it just has the “Sub-Menu” text with nothing under it and it looks out of place on pages without children – i.e. home page. Any help would rock!!!
<div class="interior"> <ul class="tabs"> <li class="cat"><a href="#tab-cat">Sub-Menu</a></li> </ul> <div class="tabcontent" id="tab-blr"> <ul> <?php global $id; wp_list_pages("title_li=&child_of=$id&show_date=modified &date_format=$date_format"); ?> </ul> </div>
- The topic ‘How to hide a list unless on a certain page’ is closed to new replies.