Don't show current page option?
-
Hi your plugin was really useful for us. The two items that another user complains about were extremely useful from us
Widget will now show sibling pages if there are no children and there are sibling pages
Default sort order changed to the specified menu order in WordPress
However there is a feature that is missing. The ability to exclude the current page from the list of navigation items. We had to hack it to perform that way:
Here is the code to do it in case you would like to make this a proper option:
— child-page-navigation.orig/child-page-navigation.php 2012-06-27 01:43:42.000000000 +0300
+++ child-page-navigation/child-page-navigation.php 2012-11-20 15:30:00.062651844 +0200
@@ -68,13 +68,15 @@echo ""; echo $after_widget; }elseif($post -> post_parent) { // Show the sibling pages if there are no children - if(count($siblings)) { + if(count($siblings) > 1) { echo $before_widget; $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } echo " <ul>"; foreach($siblings as $page){ - echo " <li><a>ID)."'>".get_the_title($page->ID)."</a></li> "; + if ($page->ID != get_the_ID()) { + echo " <li><a>ID)."'>".get_the_title($page->ID)."</a></li> "; + } } echo "</ul> "; echo $after_widget;
https://www.ads-software.com/extend/plugins/child-page-navigation/
- The topic ‘Don't show current page option?’ is closed to new replies.