Posted By

gd6d on 12/13/09


Tagged

wordpress title Parent


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

BrianCoyDesign


How to Show Parent Page Title Regardless of What Subpage You Are On


 / Published in: PHP
 

URL: http://www.instantshift.com/2009/12/08/22-latest-exceptional-wordpress-hacks/

  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.