Skip Navigation

[Resolved] Predefine and hide options on user profile page (dashboard)

This support ticket is created 7 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Toronto (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Meagan Hanes 7 years, 2 months ago.

Assisted by: Meagan Hanes.

Author
Posts
#486677
help_toolset-access.jpg

I'd like to predefine some user profile options (eg.: "adimin color scheme" and "disable Show toolbar when viewing site"), and then, hide this options from specific user-roles. Is it possible with Access Control?

#486740

Hi there! Thanks for your question about automatically checking and hiding certain fields on the user options page.

While Access does not include this functionality, you should be able to do this through custom code. One solution is to accomplish this through jQuery. Here's a method to hide fields: http://wordpress.stackexchange.com/questions/32785/how-to-remove-these-fields-from-the-profile-section And here's a way to check off the checkbox depending on what version of jQuery you're running: http://stackoverflow.com/questions/426258/setting-checked-for-a-checkbox-with-jquery

The function in the first link above uses the handy WordPress function current_user_can (https://codex.wordpress.org/Function_Reference/current_user_can) which applies this function to certain user capabilities - by requesting a capability that matches the desired user role (https://codex.wordpress.org/Roles_and_Capabilities) we can effectively limit by user role.

If you require custom programming to help with implementing this, we have a link to Certified Partners you can find at the bottom of this page.

Hope this helps!
Meagan

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.