Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get parent page link wordpress

<?php global $post;
  if ( $post->post_parent ) { ?>
    <a href="<?php echo get_permalink( $post->post_parent ); ?>" >
    <?php echo get_the_title( $post->post_parent ); ?>
    </a>
<?php } ?>
Source by wordpress.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #parent #page #link #wordpress
ADD COMMENT
Topic
Name
8+5 =