Show third level menu only.
-
Good day!
I’m having some problem with my menu and was hoping if someone could help me? I’m kinda new to wordpress and still don’t know how to actually edit php pages.
I have a menu:
PARENT
PARENT
PARENT
– Child-1
— grandchild(1)
— grandchild(1)
– Child-2
— grandchild(2)
— grandchild(2)
PARENTWould it be possible to show just the grandchild of Child-1 if you are inside Child-1? And I was hoping to show all the grandchild(1) listing if you are inside grandchild(1) only.
And if you are inside Child-2 the menu would just list grandchild(2)?
The code I got from this site is this:
<?php
if($post->post_parent)
$children = wp_list_pages(“title_li=&child_of=”.$post->post_parent.”&echo=0″);
else
$children = wp_list_pages(“title_li=&child_of=”.$post->ID.”&echo=0″);
if ($children) { ?>-
<?php echo $children; ?>
<?php } ?>
But the code above is also showing the Child-1 and Child-2 title. Is it possible to not show the title of Child-1 and Child-2? Thank you very much for your time and reply.
- The topic ‘Show third level menu only.’ is closed to new replies.