-
-
Save billerickson/ca0cf1514e3d45e1f7bd to your computer and use it in GitHub Desktop.
Remove Post Title from teasers in Genesis Grid plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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