Last active
July 30, 2016 22:48
-
-
Save billerickson/2514234aac626621ae42 to your computer and use it in GitHub Desktop.
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 Post Info and Meta from Teasers | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/code/remove-post-info-meta-teasers/ | |
*/ | |
function be_remove_info_from_teasers() { | |
// First, we make sure we're in the grid loop. | |
if( ! apply_filters( 'is_genesis_grid_loop', false ) ) | |
return; | |
// Remove if a teaser | |
if( in_array( 'teaser', get_post_class() ) ) { | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); | |
remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); | |
} | |
} | |
add_action( 'genesis_before_entry', 'be_remove_info_from_teasers' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment