Skip to content

Instantly share code, notes, and snippets.

@damiencarbery
Created April 29, 2019 10:58
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 damiencarbery/65ad3283531ee36c0b591dda2a93ffda to your computer and use it in GitHub Desktop.
Save damiencarbery/65ad3283531ee36c0b591dda2a93ffda to your computer and use it in GitHub Desktop.
Move title off hero image in Essence Pro: Move title off the hero image and back into the content area in Essence Pro theme https://www.damiencarbery.com/2019/04/move-title-off-hero-image-in-essence-pro/
<?php
/*
Plugin Name: Move title off hero image in Essence Pro
Plugin URI: https://www.damiencarbery.com/2019/04/move-title-off-hero-image-in-essence-pro/
Description: Move title off the hero image and back into the content area in Essence Pro theme.
Author: Damien Carbery
Author URI: https://www.damiencarbery.com
Version: 0.1
*/
// Disable putting the page title on top of the hero image but retain the hero image creation.
add_action( 'genesis_meta', 'lmtt_essence_page_hero_header', 5 );
function lmtt_essence_page_hero_header() {
remove_action( 'genesis_meta', 'essence_page_hero_header' );
// Don't show the hero image on this page.
if ( is_page( 'neuroblastoma-fact-sheet' ) ) {
return;
}
// Hero area setup.
add_action( 'genesis_before_header', 'essence_header_hero_start' );
add_action( 'genesis_after_header', 'essence_header_title_wrap', 90 );
add_action( 'genesis_after_header', 'essence_header_title_end_wrap', 98 );
add_action( 'genesis_after_header', 'essence_header_hero_end', 99 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment