Plugin | WordPress

How to give access to NinjaTables for Other User Role in WordPress

I have launched NinjaTables in WordPress repository few months ago and I got a good responses from the community and It’s amazing that people are happy with it.

By default, Only Admin User role can manage the table data at WordPress Admin Panel. But If you would like to provide access to other user roles it’s very easy. Mainly You have to hook `ninja_table_admin_role` filter and return what your desired capability name.

Example: Say You want to give access to Admins and Editors for managing your ninja tables, Just open theme’s functions.php file and paste:

add_filter('ninja_table_admin_role', function ($capability) {
	return 'edit_others_posts';


Here ‘edit_others_posts’ is the capability name. if You want to give access to authors too just change the capability with ‘publish_posts’, so the code will be

add_filter('ninja_table_admin_role', function ($capability) {
	return 'publish_posts';


if You did not try NinjaTables yet, You can download for free from WordPress Repository


Ninja Tables – Best WP DataTables Plugin for WordPress


Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *