• Resolved colmanc

    (@colmanc)


    It seems as though only admins can create new testimonials. Can I add capabilities to the editor user role to allow them to add/edit testimonials too?

Viewing 1 replies (of 1 total)
  • Plugin Author ShapedPlugin LLC

    (@shapedplugin)

    Hi @colmanc

    Thanks for choosing our plugin.

    Yes, you can add capabilities to the editor user role to allow them to add/edit testimonials easily using the following codes into your PHP files:

    add_filter( 'sp_testimonial_post_type_args', 'testimonial_show_to_editor' );
    function testimonial_show_to_editor( $args ) {
     unset( $args['show_ui'] );
     $editor_compatible = array( 'show_ui' => current_user_can( 'edit_others_pages' ) ? true : false );
     return array_merge( $args, $editor_compatible );
    }

    Let me know if you have done it fine.

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘User Roles’ is closed to new replies.