Need to make a mini-menu.
There is a code that displays, the name of the parent of this page must be done so that this name is displayed by a link, that is, in which case the user could click, and go back to the branch.
<?php if ( 0 == $post->post_parent ) { the_title(); } else { $parents = get_post_ancestors( $post->ID ); echo apply_filters( "the_title", get_the_title( end ( $parents ) ) ); } ?> It is necessary that the result be something like this:
Имя родителя > Имя текущей страницы It was for categories that I found snippet in wordpress site, but for pages like this, it turned out to be not so easy. The meaning of the idea is that while navigating, the user could simply click on the “branches” that he follows. And do not refer to the example of the menu, which is from the side of the site bar and twist scrolled.