Posted By

gd6d on 10/30/09


Tagged

wordpress title Parent


Versions (?)

How to: Show parent page title regardless of what subpage you are on


 / Published in: PHP
 

URL: http://www.wprecipes.com/how-to-show-parent-page-title-regardless-of-what-subpage-you-are-on

  1. <?php
  2. if($post->post_parent) {
  3. $parent_title = get_the_title($post->post_parent);
  4. echo $parent_title;
  5. } else {
  6. wp_title('');
  7. }
  8. ?>

Report this snippet  

You need to login to post a comment.