Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Move Genesis Entry Header Markup to Site Header
<?php
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
add_action( 'genesis_header', 'hjs_add_entry_header' );
function hjs_add_entry_header() {
if (is_home() || is_front_page() || is_archive()) {
add_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
add_action( 'genesis_entry_header', 'genesis_do_post_title' );
add_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
} else { ?>
<div class="title-banner">
<div class="wrap">
<?php
genesis_entry_header_markup_open();
genesis_do_post_title();
genesis_entry_header_markup_close();
?>
</div>
</div>
<?php }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.