rustyeddy
7/30/2014 - 12:19 AM

Remove Genesis Post / Entry Title

Remove Genesis Post / Entry Title

/**
 * Styled with SCSS and a little bourbon.
 *
 * This file has all the styling used by the entry-title-banners
 * If you are not using them you can remove this from style.scss
 */
@mixin title-darkener($start-color:#f7f7f7, $howmuch:15%) {
	$end-color: darken( $start-color, $howmuch );
   	@include radial-gradient( $start-color, $end-color );
	border-bottom: 1px solid darken( $start-color, $howmuch / 2 );
}

@mixin title-background($start-color:#f7f7f7, $end-color:#d2d2d2) {
   	@include radial-gradient( $start-color, $end-color );
	border-bottom: 1px solid darken( $end-color, 80% );
}


/**
 * These stylings are for the defaults
 */
header.entry-title {
	padding: 30px 0;

   	@include title-darkener( $banner-background-default );
	h1 {
		@include wrap;
		color: #333;
		font-size: 1.1em;
		margin-bottom: 0;
		text-align: center;
	}

	h2 {
		@include wrap;
		color: white;
		font-family: $open-sans;
		font-size: .8em;
		margin-top: 20px;
		text-align: center;
	}
}
/**
 * This function will remove the title from a post in a Genesis child theme
 */
function gs_remove_entry_title()
{
    remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
    remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
    remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
}
 
/**
 * We could do something like this to move the title just after the header:
 */
action( 'genesis_after_header', 'gs_create_entry_title_banner' );
function gs_create_entry_title_banner()
{
    echo get_the_title();
}