How can a particular user or user type view and edit all records in a table that is set to user can view/edit their own data?
If the user logs in as admin, than he gets to see the admin bar, which I don't want. But if I make a user Editor or something else, then I want that user to see all records.
Unfortunately, if you enable "Users see and edit only own data", even admins can only see their entries.
My advice would be to create a separate table querying the same database table, the first table was created from.
For instance, your "Users see and edit only own data" table has database table name "wp_wpdatatable_1":
You'd need to create a new table using SQL Query and create the table with:
SELECT * FROM wp_wpdatatable_1
That way, you can make that table display on a page not accessible to public, but only people who you share the URL with, and allow editing only for user role - Editor.
How can a particular user or user type view and edit all records in a table that is set to user can view/edit their own data?
If the user logs in as admin, than he gets to see the admin bar, which I don't want. But if I make a user Editor or something else, then I want that user to see all records.
Hello again Dabir Ahmad Bhatti.
Unfortunately, if you enable "Users see and edit only own data", even admins can only see their entries.
My advice would be to create a separate table querying the same database table, the first table was created from.
For instance, your "Users see and edit only own data" table has database table name "wp_wpdatatable_1":
You'd need to create a new table using SQL Query and create the table with:
That way, you can make that table display on a page not accessible to public, but only people who you share the URL with, and allow editing only for user role - Editor.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables