Forum Replies Created

Viewing 1 replies (of 1 total)
  • Forum: Plugins
    In reply to: Fold Page List plugin

    Thanks everyone. Here is another modification of the code using the FoldPages to list the parents and the siblings in separate menus (note that I have my css classes included here as well which you’ll need to modify).

    <!-- level 2 menu begin -->
    
    <div class="submenuwrap">
    <ul class="submenu">
    <?php
    $g_page_id = $wp_query->get_queried_object_id();
    $ancestorIDs = _wswwpx_page_get_ancestor_ids($g_page_id);
    $titlePage = $ancestorIDs[1];
    wp_list_pages("title_li=&child_of=".$titlePage."&depth=1");
    ?>
    </ul>
    </div>
    
    <!-- level 2 menu end -->
    
    <!-- level 3 menu begin -->
    
    <?php
      if($post->post_parent)
      $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0&sort_column=menu_order&sort_order=DESC");
      else
      $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0&sort_column=menu_order&sort_order=DESC");
      if ($children) { ?>
    <div class="newslistwrap">
    <ul class="newslist">
    <h5 id="post-<?php the_ID(); ?>"><?php the_title(); ?></h5>
    <?php echo $children; ?>
    </ul>
    </div>
    <?php } ?>
    
    <!-- level 3 menu end -->
Viewing 1 replies (of 1 total)