[Plugin: PHP Code Widget] Listing subpages not working
-
The following code, when pasted into the template sidebar, works perfectly, but doesn’t work when using this plugin.
<?php //show parent page $parent_title = get_the_title($post->post_parent);?> <a href="<?php echo get_permalink($post->post_parent) ?>" class="parent"><?php echo $parent_title;?></a> <?php //show child pages if($post->post_parent) $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); if ($children) { ?> <ul id="subnav"> <?php echo $children; ?> </ul> <br clear="all" /> <?php } ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: PHP Code Widget] Listing subpages not working’ is closed to new replies.