We are an office in The university business incubator as one company and in site of the university, so i want to know is there any module to creating restricted account only for only editing one page ( company introduction page).


I have seen here , and is Author account could be used for editing only their pages?

Thanks for your attention.

1 Answer 1


No, Core roles and capabilities don't restrict users in the way you're wanting to restrict them.

You could try an out-of-the-box role/member plugin. There is likely one available that will let you restrict one user's access.

It might be simpler to instead create a custom post type for the page itself. When you register a new post type, you can use map_meta_cap and define your own custom capabilities. Then, you would create a role with just those capabilities, and assign the role to that user, and when they logged in, they would only have access to their user profile and editing that particular URL.

For example:

/* Plugin Name: WPSE Info Page
// Register a new post type called Info (or About, or whatever you choose)
add_action('init', 'wpse_create_cpt');
function wpse_create_cpt() {
            'label' => __('Info', 'textdomain'),
            'public'            => true,
            'show_in_rest'      => true,
            'has_archive'       => false,
            'hierarchical'      => false,
            // This is where you define custom capabilities
            'map_meta_cap'      => true,
            'capabilities'      => array(
                'edit_post'                 => 'edit_info_page',
                'read_post'                 => 'read_info_page',
                'delete_post'               => 'delete_info_page',
                'create_posts'              => 'create_info_pages',
                'delete_posts'              => 'delete_info_pages',
                'delete_others_posts'       => 'delete_others_info_pages',
                'delete_private_posts'      => 'delete_private_info_pages',
                'delete_published_posts'    => 'delete_published_info_pages',
                'edit_posts'                => 'edit_info_pages',
                'edit_others_posts'         => 'edit_others_info_pages',
                'edit_private_posts'        => 'edit_private_info_pages',
                'edit_published_posts'      => 'edit_published_info_pages',
                'publish_posts'             => 'publish_info_pages',
                'read_private_posts'        => 'read_private_info_pages'

// Create a new role that has full capabilities for the Info post type
add_action('init', 'wpse_create_cpt_role');
function wpse_create_cpt_role() {
    add_role('info', 'Info Editor');
    // You probably want them to be able to read on the front end
    // And upload files, but that's up to you
    // Here's where you really decide - should they be able to add, edit, delete
    // or maybe only edit (theirs, others, private, and published)
    // and not delete the page, or add additional pages

// Optional - give Admin users the ability to edit the info page
// (Since you're using custom capabilities, they can't edit unless you do this)
add_action('init', 'wpse_grant_cpt_caps');
function wpse_grant_cpt_caps() {
    $admin = get_role('administrator');
    // Again, decide which capabilities you want them to have
    // (usually you'll want to grant full capabilities to Admins)

You can install this as a plugin to create the CPT and roles, and then you'll still need to create (or update) a user to give that person the new role for the new CPT. And if you previously published the page as another post type - example, a Page - you'll want to copy that info over, publish the page as the CPT, and delete the original Page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.