echoing menu navigation label other than navigation bar
-
Hello
Within the dashboard of wordpress, I am in the menu section and have changed the navigation label of a page.
This echos out fine on the front end (navigation bar.) What I want to do is print this elsewhere on the site.
e.g I changed the navigation label to about us. (original page title:Joe bloggs) This echos out to the navigation on the front end as about us (this is fine), However I need to print out the label value (about us) elsewhere on the site e.g. left hand panel sub navigation.
The code I am currently using below:
<?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) { $parent_title = get_the_title($post->post_parent);?> <h2 class="lhp_title"><strong><?php echo $parent_title; ?></strong>/h2> <ul> <li><a>post_parent)?>"><?php echo $parent_title;?></a><?php echo $children; ?></li> </ul> <?php } ?>
[Please post code snippets between backticks or use the code button.]
I want to input the navigation label code instead of the (echo $parent_title;) within h2 tag.
Hope you can help
Thanks
- The topic ‘echoing menu navigation label other than navigation bar’ is closed to new replies.