Skip to content

Instantly share code, notes, and snippets.

@cliffordp
Forked from patric-boehner/functions.php
Last active September 23, 2022 03:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cliffordp/744a19f00565051924ec7f0d46ac687e to your computer and use it in GitHub Desktop.
Save cliffordp/744a19f00565051924ec7f0d46ac687e to your computer and use it in GitHub Desktop.
Remove in-post settings for the Genesis Framework, including SEO, layout, and scripts.
<?php
// Remove in-post settings for the Genesis Framework, including SEO, layout, and scripts.
// Relevant Genesis code can be found in theme's lib > admin > inpost-metaboxes.php
if( ! function_exists( 'cliff_genesis_simplify_editing_screens' ) ) {
/**
* Remove in-post Genesis settings by post type.
* @link https://gist.github.com/cliffordp/744a19f00565051924ec7f0d46ac687e This snippet.
*/
function cliff_genesis_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' );
/**
* Remove Genesis in-post SEO Settings
* @link https://my.studiopress.com/documentation/snippets/admin-management/remove-the-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' );
}
}
add_action( 'init', 'cliff_genesis_simplify_editing_screens' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment