Created
November 28, 2014 06:44
-
-
Save pasadamedia/74b12bc248b0ddf66db4 to your computer and use it in GitHub Desktop.
Modify display of post entries on Genesis blog and archive pages.
This file contains hidden or 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
/** | |
* Modify display of post entries on Genesis blog and archive pages. | |
* | |
*/ | |
function pasada_modify_entries() { | |
if ( is_home() || is_author() || is_category() || is_tag() || is_search() ) { | |
// Remove unwanted post elements. | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); | |
remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); | |
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 ); | |
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 ); | |
// Move image to top of post. | |
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); | |
add_action( 'genesis_entry_header', 'genesis_do_post_image', 1 ); | |
} | |
} | |
add_action ( 'genesis_before_entry' , 'pasada_modify_entries' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment