Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created April 20, 2015 19:49
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 billerickson/ca0cf1514e3d45e1f7bd to your computer and use it in GitHub Desktop.
Save billerickson/ca0cf1514e3d45e1f7bd to your computer and use it in GitHub Desktop.
Remove Post Title from teasers in Genesis Grid plugin
<?php // Remove when adding to your theme
/**
* Remove Post Title from Grid Posts
*
*/
function be_remove_post_title_in_grid() {
// First, we make sure we're in the grid loop.
if( ! apply_filters( 'is_genesis_grid_loop', false ) )
return;
if( in_array( 'teaser', get_post_class() ) ) {
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
// remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
// remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
}
}
add_action( 'genesis_before_entry', 'be_remove_post_title_in_grid' );
@billerickson
Copy link
Author

This will remove the post title from "teaser" posts in the Genesis Grid plugin. If you remove the // from lines 15-16 it will also remove the entry-header markup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment