/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php global $wp_query; { $parent = $wp_query->post->ID; } else { $parent = $wp_query->post->post_parent; } ?> <?php if(wp_list_pages("title_li=&child_of=$parent&echo=0" )): ?> <div id="submenu"> <ul> <?php wp_list_pages("title_li=&child_of=$parent" ); ?> </ul> </div> <?php endif; ?>