Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11352

    An empty sidebar on a page will have a page-siblings widget by default, is it possible to add this as a widget so it could be moved around? I don’t see it in the widget menu.

    Also, how hard would it be to alter it to show only page children instead of sieblings?

    Thanks in advance.

    #71478

    Hi Ramsy,

    Its a function of the theme so you wouldn’t be able to easily make it into its on widget. You can modify it however without too much trouble.

    Open up sidebar.php and you can see the code that displays the subnavigation starting at around line 30.

    Remove:

    if (!empty($post->post_parent))
    {
    $ancestors = get_post_ancestors($post->ID);
    $root = count($ancestors)-1;
    $parent = $ancestors[$root];
    }

    Keep a backup of this page in case you want to re-add this later on.

    Regards,

    Devin

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Page-siblings widget question’ is closed to new replies.