WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Fold page list – where to start

[Resolved] Fold page list – where to start

  • I have installed the Fold Page List plugin to highlight the current page’s first Parent. Unfortunately I have no clue where to start with this plugin. I have opened the php file, and see some functions, which I try to use as in:

    _wswwpx_page_get_ancestor_ids(1);
    _wswwpx_page_get_ancestor_ids();
    wswwpx_fold_page_list();
    wswwpx_fold_page_list('exclude=8,9,26,27&sort_column=menu_order&title_li=<h3>'.__('Organization').'</h3>' );

    I tried this code, even all lines at the same time, but they just do not give me anything. I probably do not get it, maybe it’s just too late.. The plugin page nor the forum give me any directions on how to use the functions. I have put the code into a theme, before the Loop.

    I just want to know the highest Parent of the current page, nothing more, nothing less. Can anyone give me a hint on where to look?

Viewing 2 replies - 1 through 2 (of 2 total)
  • ok, in a last resort I decided to Google for “_wswwpx_page_get_ancestor_ids” and found my solution in the WordPress Support forum which I could not find with the search box here. The following code is what you need to find the id of the upmost Parent for a page:

    // get id of current page
    $g_page_id = $wp_query->get_queried_object_id();
    // find ancestor pages
    $ancestors = _wswwpx_page_get_ancestor_ids($g_page_id);
    // find topmost ancestor
    $ancestor = reset($ancestors);
    print "$ancestor";

    OK, I just want all of the list items in a submenu to display…

    I am using the fold list plugin

    I am sorting by menu order and not using the pages title:

    <?php wswwpx_fold_page_list(‘title_li=&sort_column=menu_order’,’true’); ?>

    Here’s what happens: The submenu (child pages) of a page are only displayed when that item is clicked. GREAT, that’s what I want.

    None of the submenus pages (child pages) themselves have children.

    When I click on one of the submenu pages, the other “siblings” disappear.

    Is this SUPPOSED to happen? If not, how do I stop it? I’d like them to remain visible.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Fold page list – where to start’ is closed to new replies.
Skip to toolbar