Skip to content

Instantly share code, notes, and snippets.

@salcode
Created March 31, 2016 19:33
Show Gist options
  • Save salcode/c08b5d1f5d54224adb34df1496f79e22 to your computer and use it in GitHub Desktop.
Save salcode/c08b5d1f5d54224adb34df1496f79e22 to your computer and use it in GitHub Desktop.
WordPress mu-plugin for Genesis to only display post info when the post type is "post". This applies to the single template, archive, and search results page.
<?php
/**
* Genesis: Only display post info when post type is "post"
*/
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
add_action( 'genesis_entry_header', 'fe_genesis_post_info', 12 );
function fe_genesis_post_info() {
if ( 'post' === get_post_type() ) {
genesis_post_info();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment