trubble
Member
Posted 5 years ago #
Hi there,
Does anyone have experience of using the Fold Page List (http://www.webspaceworks.com/resources/wordpress/30/) plugin?
It's exactly what I need EXCEPT that I need to hide the top most level of links (these are already displayed in a horizontal nav on my site). So if you are on a page that has children (and grandchildren) a menu is displayed on the left that is expandable (as Fold Page List works)
Any help would be most appreciated!!! I have wordpress 2.1 and fold page list v1.74
J
warwell
Member
Posted 4 years ago #
Yo. Maybe I can help. Where you want your list to display, use this code
<ul>
<?php //if current post's parent is not 0, track back up the chain until parent is zero
//then use that as the value passed in for child_of
$emp_parent_post = 1;
$emp_testingpage = $post->ID;
//print $emp_testingpage." ";
while ($emp_parent_post <> 0){
$emp_parent_post = $wpdb->get_var("SELECT post_parent FROM $wpdb->posts WHERE ID = $emp_testingpage");
//print $emp_parent_post." ";
if ($emp_parent_post <> 0) $emp_testingpage = $emp_parent_post;
//print $emp_testingpage." ";
}
?>
<?php
wp_list_pages(fold_page_menus(). "title_li=&Sub-Pages&depth=2&child_of=" . $emp_testingpage);
?>
</ul>
I had this on a site where the plugin was in use:
<ul>
<?php
$thispage = $wp_query->post;
if($thispage->post_parent!=0)
{
wswwpx_fold_page_list("title_li=&child_of=".$thispage->post_parent);
}
else
{
wswwpx_fold_page_list("title_li=&child_of=".$thispage->ID);
}
?>
</ul>
(and in the top - horizontal - menu I used the depth=1 parameter)
anciwasim
Member
Posted 4 years ago #
Download WordPress 2.3! ... Fold Page post List ..i have created..this plug ins for 2.3 ,
if you want mail me at anciwasim@gmail.com ,
then i will send you plug-ins...
enjoy code