Created
June 16, 2023 08:43
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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