How to get current url parent in WordPress code example
Example: 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 } ?>