Created
November 23, 2015 22:41
-
-
Save davidperezgar/743475c368aead94319a to your computer and use it in GitHub Desktop.
Disable Yoast SEO Meta
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
add_action('add_meta_boxes', 'yoast_is_toast', 99); | |
function yoast_is_toast(){ | |
//capability of 'manage_plugins' equals admin, therefore if NOT administrator | |
//hide the meta box from all other roles on the following 'post_type' | |
//such as post, page, custom_post_type, etc | |
if (!current_user_can('activate_plugins')) { | |
remove_meta_box('wpseo_meta', 'post_type', 'normal'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment