Skip to content

Instantly share code, notes, and snippets.

@torbentschechne
Created March 15, 2015 09:17
Show Gist options
  • Save torbentschechne/d90d729115e274c173ce to your computer and use it in GitHub Desktop.
Save torbentschechne/d90d729115e274c173ce to your computer and use it in GitHub Desktop.
//Remove Post info & Post Title
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
remove_action( 'genesis_entry_header', 'genesis_post_info', 12);
// Add the Post Info & Post Title in different order
add_action( 'genesis_entry_header', 'genesis_post_info');
add_action( 'genesis_entry_header', 'genesis_do_post_title' );
function custom_remove_image_from_features() {
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
if ( in_array( 'feature', get_post_class() ) ) {
add_action( 'genesis_after_entry_content','genesis_do_post_image' );
}
if ( in_array( 'one-half', get_post_class() ) ) {
add_action( 'genesis_entry_header', 'genesis_do_post_image' );
}
}
add_action( 'genesis_before_entry', 'custom_remove_image_from_features' );
add_action( 'genesis_before_post', 'custom_remove_image_from_features' );
@torbentschechne
Copy link
Author

I changed the second if statement to:

    if ( in_array( 'one-half', get_post_class() ) ) {
        remove_action( 'genesis_after_entry_content','genesis_do_post_image' );
        add_action( 'genesis_entry_header', 'genesis_do_post_image', 9);        
    }

Now it works well.

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