Skip to content

Instantly share code, notes, and snippets.

@nickdavis
Created February 3, 2015 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickdavis/424c440bd4f48ca0a4ad to your computer and use it in GitHub Desktop.
Save nickdavis/424c440bd4f48ca0a4ad to your computer and use it in GitHub Desktop.
<?php
//* ***** PARENT TITLE AFTER HEADER
add_action( 'genesis_after_header', 'cw_title' );
function cw_title() {
if ( ! is_front_page() || ! is_home() ) {
global $post;
$parent_title = get_the_title( $post->post_parent );
echo '<div class="parent-title"><h1>' .$parent_title. '</h1></div>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment