Wordpress: Parent page's title in Subpage


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. if($post->post_parent) {
  3. $parent_title = get_the_title($post->post_parent);
  4. echo $parent_title;
  5. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.