I have multi-author website and I am not very comfortable for allowing all members to enter SEO details in the posts they are publishing. I would like this would be visible only to Administrator of the website. Any ideas?
|
It didn't say in the API docs on the Yoast SEO plugin site what the
Which is hooked onto
Of course you could get the ID from the meta box itself on the post edit screen... Anyway. You can do the following,
...where post type is the post type you wish to apply this restriction too, such as Should do the trick. update: |
|||||||||||||
|
|
Try pasting this in a plugin or theme
To avoid any errors... This checks to make sure the function exists, before attempting to hide stuff, allowing you to deactivate the plugin, and not throw errors. You may need to hook into
|
|||
|
|
|
You can remove it using the remove_meta_box function.
Notice the 100000 in the add_action, this makes sure that this is done after the WP SEO metabox has been hooked in. |
|||
|
|
|
You can use the Adminimize plugin to hide items from users depending on their roles. Have used this myself to hide some Yoast SEO stuff from clients and simplifying the back end. http://wordpress.org/extend/plugins/adminimize/ Pretty straight forward to use by adding the css selectors for the items you want to hide. Have used it to hide the SEO Page Analysis tabs (#linkdex) |
|||
|
|
