Share:
Share
This is a cool simple tutorial, if you are using WordPress as CMS. This tutorial helps you show Parent Page Title regardless of what subpage you are on. So on whatever subpage you go, you still see Parent Page title. It comes handy when you use WordPress as CMS, for example in news site.
Its simple, all you have to do is pase the below code where you want to show the Parent Page title.
<?php
if($post->post_parent) {
$parent_title = get_the_title($post->post_parent);
echo $parent_title;
} else {
wp_title('');
}
?>
Thanks to WPRecipes
Though this code was courtesy of WPRecipes, you can still ask any questions you want via comment form. Also comment if you found this tutorial useful.
Related Posts:
Share:
Share




Trackbacks/Pingbacks
Social comments and analytics for this post…
This post was mentioned on Twitter by enked: RT @WPPanda Show Parent Page Title instead of Subpage http://bit.ly/7O4lQl...