WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: SB Child List] No child pages show siblings

[Resolved] [Plugin: SB Child List] No child pages show siblings

  • Hi,
    Geat plugin doing nearly what I need but…
    I’m using a modified K2 theme and apply your plugin to all pages with
    <?php echo sb_cl_render_child_list(); ?>
    Everything is fine as long as the pages have childs but for the last level it give the sibling pages instead of nothing.
    Do you have any idea where it could come ?

    Thanks alot !

    Zerbil

    http://wordpress.org/extend/plugins/sb-child-list/

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m using the widget, but getting the exact same problem. Sibling pages show up if there is no child page defined.

    Any help would be greatly appreciated!

    This “problem” is in fact the “normal” behavior of this plugin. It’s not really clean but the easy solution is to delete some line in the file (sb_child_list.php).

    you must find (more or less at the middle of the file) the “function sb_cl_render_child_list”. At the end of this function, you will find the following code:

    else if ($nest_level == 1) {
    		$parent = get_page($id);
    		if ($parent->post_parent) {
    			$return .= sb_cl_render_child_list($template_id, $parent->post_parent, $nest_level, $order);
    		}
    	}

    Just delete it and it will be allright 🙂

    I’m not sure that this trick has no other effects so use it carefully and be sure to remember the change when you upgrade the plugin.

    Hope it helps,

    Cheers !! 😉

    Thanks a ton, Zerbil. I’ve commented out that else if statement and everything seems to be working perfectly.

    I really appreciate the help!

    Plugin Author Sean Barton

    @seanbarton

    Hi..

    Thanks for your comments here zerbil. I have just made it an option in the settings page to turn this block on or off so you don’t need to keep editing the code. Any more comments about the plugin I would love to hear.

    Thanks for resolving this issue in my absence.

    thanks
    Sean

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] [Plugin: SB Child List] No child pages show siblings’ is closed to new replies.