Skip to content

Instantly share code, notes, and snippets.

@patric-boehner
Last active September 23, 2022 02:55
Show Gist options
  • Save patric-boehner/29c77da771dd6576c14e3d45ae0c16ba to your computer and use it in GitHub Desktop.
Save patric-boehner/29c77da771dd6576c14e3d45ae0c16ba to your computer and use it in GitHub Desktop.
Removing in-post settings for the Genesis Framework, including seo, layout and scripts.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
/*
* You can find the refrance for supports that Genesis adds
* in the core files lib > admin > inpost-metaboxes.php
*/
//* Remove Action
//**************************************
//* Remove Genesis in-post SEO Settings
remove_action( 'admin_menu', 'genesis_add_inpost_seo_box' );
//* Remove Genesis Layout Settings
remove_action( 'admin_menu', 'genesis_add_inpost_layout_box' );
//* Remove Genesis in-post Scripts Settings
remove_action( 'admin_menu', 'genesis_add_inpost_scripts_box' );
//* Remove Post Type Support
//**************************************
//Remove inpost Genesis settings
add_action( 'init', 'pb_simplify_editing_screens' );
function pb_simplify_editing_screens() {
// Posts
remove_post_type_support( 'post' , 'genesis-scripts' );
remove_post_type_support( 'post' , 'genesis-seo' );
remove_post_type_support( 'post' , 'genesis-layouts' );
//Pages
remove_post_type_support( 'page' , 'genesis-scripts' );
remove_post_type_support( 'page' , 'genesis-seo' );
remove_post_type_support( 'page' , 'genesis-layouts' );
}
//* REFRANCE:
// http://www.ambrosite.com/blog/simplify-wordpress-editing-screens-using-remove_post_type_support
//* https://thomasgriffin.io/remove-metaboxes-genesis-theme-seo-settings-pages/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment