Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this questionWhen logged in as Author, the screen options do not include OceanWP settings. If logged in as Administrator, the options do include OceanWP settings.
The Author needs these settings to remove such things as breadcrumbs, comments, etc. from a certain kinds of posts.
Any help or direction greatly appreciated. Theme: OceanWP + Ocean Extra.
Elementor is installed but is not used for posts.
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this questionWhen logged in as Author, the screen options do not include OceanWP settings. If logged in as Administrator, the options do include OceanWP settings.
The Author needs these settings to remove such things as breadcrumbs, comments, etc. from a certain kinds of posts.
Any help or direction greatly appreciated. Theme: OceanWP + Ocean Extra.
Elementor is installed but is not used for posts.
Share Improve this question edited Feb 6, 2019 at 22:13 phatskat 3,1741 gold badge18 silver badges26 bronze badges asked Feb 6, 2019 at 20:07 Norma ElliottNorma Elliott 11 bronze badge1 Answer
Reset to default 1It looks like you can hook into the ocean_main_metabox_capabilities
filter:
It is defined in /plugins/ocean-extra/includes/metabox/metabox.php
:
$capabilities = apply_filters( 'ocean_main_metaboxes_capabilities', 'manage_options' );
In your child theme or a custom plugin, try the following (for example, in /themes/mytheme/functions.php
:
add_filter( 'ocean_main_metaboxes_capabilities', 'my_custom_metabox_role' );
/**
* Change the default role used to display the Ocean Extra metabox.
*
* @param string $role The role to use, defaults to 'manage_options' (Administrator).
* @return string
*/
function my_custom_metabox_role( $role ) {
if ( ! current_user_can( 'publish_posts' ) ) {
return $role;
}
return 'publish_posts';
}