WordPress.org

Ready to get started?Download WordPress

Forums

SB Child List
[resolved] No child pages show siblings (5 posts)

  1. zerbil
    Member
    Posted 1 year ago #

    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/

  2. feshin
    Member
    Posted 1 year ago #

    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!

  3. zerbil
    Member
    Posted 1 year ago #

    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 !! ;-)

  4. feshin
    Member
    Posted 1 year ago #

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

    I really appreciate the help!

  5. Sean Barton
    Member
    Plugin Author

    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.