• Resolved phamkhang201

    (@phamkhang201)


    I create a custom post type and taxonomy but i cannot select term
    https://prnt.sc/Rn7JarSvR9oI
    please help me ! thank you

    == UPDATE ==
    when i set role for edit default post i can choose term but when i unset role edit default post i can not choose term again

    • This topic was modified 2 years, 1 month ago by phamkhang201.
    • This topic was modified 2 years, 1 month ago by phamkhang201.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Omar ElHawary

    (@omarelhawary)

    Hi @phamkhang201,

    Thanks for reaching Members Support Team!

    Thank you for contacting the Members Support Team!

    As you described, you’ve created a custom post type and want to allow users to select a category for it. However, this won’t happen until you add the capability to edit default posts. Could you please clarify how you created this post type and whether it has a custom capability?

    Regards,

    I have the same problem:
    Created with CPT UI plugin custom post type and custom taxonomy for it, post type capabilities filled with “disputes”. In role editor interface I checked “allow” for all fields that appeared for disputes post type, but if “Edit posts” not allowed, custom taxonomy is disabled in custom post type editor interface

    Screenshots: https://disk.yandex.ru/a/_aSF4zBVV1rhGA

    Solved:

    function update_patent_objects_capabilities( string $taxonomy, array $object_type, array $args ) : array
    {
    
        $args["cap"]->assign_terms = "edit_disputes";
    
        return $args;
    
    }
    add_action( 'registered_taxonomy_patent_objects', 'update_patent_objects_capabilities', 10, 3 );

    In future versions of plugin you should check permissions for post types that are in $object_type variable of taxonomy, not for posts

    Plugin Support Omar ElHawary

    (@omarelhawary)

    Hi @trytofinderror,

    Thanks for your solution, I will appreciate if you can open an Issue for that in github: https://github.com/caseproof/members/issues

    Regards,

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Cannot select category’ is closed to new replies.