Skip to content

Instantly share code, notes, and snippets.

@katlove
Last active August 29, 2015 14:19
Show Gist options
  • Select an option

  • Save katlove/d82b2e15abec81b921e4 to your computer and use it in GitHub Desktop.

Select an option

Save katlove/d82b2e15abec81b921e4 to your computer and use it in GitHub Desktop.
Remove the genesis layout settings for certain template files only
//* Don't show layout settings box on certain template pages admin
add_action( 'init', 'remove_layouts_templates_init' );
function remove_layouts_templates_init() {
$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ;
$template_file = get_post_meta($post_id,'_wp_page_template',TRUE);
// check for the following template types
if ($template_file == 'page-home.php'
or $template_file == 'page-testimonial.php'
or $template_file == 'page-landing.php'
) {
remove_theme_support( 'genesis-inpost-layouts' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment