Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save adczk/626f8af2c0ca457c8052e56df14de1eb to your computer and use it in GitHub Desktop.
Save adczk/626f8af2c0ca457c8052e56df14de1eb to your computer and use it in GitHub Desktop.
SmartCrawl - remove SmartCrawl SEO "onpage seo" metabox from post editor by selected post types
<?php
/**
* Plugin Name: SmartCrawl - remove "onpage seo" by post type
* Description: SmartCrawl - remove SmartCrawl SEO "onpage seo" metabox from post editor by selected post types
* Author: adczk
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*
* USE A MU PLUGIN
*
* config in line 21 below
*
* Tested with SmartCrawl 3.6.4
*/
add_action( 'do_meta_boxes', 'wpmudev_sc_remove_seo_by_post_type' );
function wpmudev_sc_remove_seo_by_post_type() {
$metabox = 'wds-wds-meta-box';
$post_types = array( 'review', 'post'); // list of post types to remove SC metabox from
foreach ( $post_types as $key=>$post_type ) {
remove_meta_box( $metabox, $post_type, 'normal' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment