plugins - OceanWP settings are missing from Add New Post

admin2025-06-03  2

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 question

When 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 question

When 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 badge
Add a comment  | 

1 Answer 1

Reset to default 1

It 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';
}
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748936985a314972.html

最新回复(0)