• Resolved matteodidone

    (@matteodidone)


    Hello,

    I am currently using the Members – Membership & User Role Editor Plugin to manage user roles and permissions on my WordPress site. I have also created custom post types using the Custom Post Type UI plugin.

    I would like to know if there is a way to use the Members plugin to manage capabilities for these custom post types without having to manually add code to the functions.php file. Specifically, I want to:

    1. Create and manage custom post types.
    2. Assign capabilities to these custom post types.
    3. Manage these capabilities entirely through the Members plugin interface without modifying functions.php.

    Is this possible with the Members plugin, and if so, could you provide a step-by-step guide or point me to relevant documentation?

    I've been able to achieve what I want, only by adding a piece of code like this to the functions.php file:


    //Test

    register_post_type('test',

    array(

    'labels' => array(

    'name' => __('Test'),

    'singular_name' => __('Test'),

    ),

    'public' => true,

    'has_archive' => true,

    'capability_type' => 'test',

    'map_meta_cap' => true,

    )

    );

    Thank you for your assistance!

Viewing 1 replies (of 1 total)
  • Plugin Support Omar ElHawary

    (@omarelhawary)

    Hi @matteodidone,

    Thanks for reaching out Members Support Team!

    Members is not a plugin to create and manage custom post types. You can assign capabilities to roles, not CPT as Members will pull all capabilities from installed plugins but it’s a developer’s job to add capabilities. You could check?Registering capabilities?and?Registering cap groups?sections in our doc:?https://members-plugin.com/docs/snippets/?to see how to display capabilities in a nice format in Members but Members will display all capabilities anyway.

    Regards,

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.