Skip to content

Instantly share code, notes, and snippets.

@JRGGRoberto
Created December 9, 2015 15:33
Show Gist options
  • Select an option

  • Save JRGGRoberto/a1c54b0df75ea4f6e232 to your computer and use it in GitHub Desktop.

Select an option

Save JRGGRoberto/a1c54b0df75ea4f6e232 to your computer and use it in GitHub Desktop.
Titulo com patch by parent page
<h1 class="header-post-title-class entry-title">
<?php
$parent_title = get_the_title($post->post_parent);
$ancestors = get_post_ancestors($post);
for ($i = (count($ancestors)-1); $i >= 0; $i--) {
$res = $ancestors[$i];
echo "<a href=\"" .get_page_link($res) ."\"a>";
echo get_the_title($res);
echo "</a> -> ";
}
echo spacious_header_title();
?>
</h1>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment