Logo

Hide admin level options (Closed)

Anakin
·
Updated ·
1 reply
User Avatar
Anakin

Hello- Since we can customize view and modules directly from UICore options, how would we hide those admin options from the team so they arent changed?

User Avatar
Andrei Voica

Hello,

To hide the admin options from the team and prevent them from being changed, you can use the PHP filter "uicore_hide_admin_customizer" in your WordPress.

Here is the PHP code that you can use:

add_filter('uicore_hide_admin_customizer', 'hide_admin_customizer');

function hide_admin_customizer($hide) {
    // Add your logic here to determine when to hide the admin customizer
    // For example, you can check the user role or any other condition

    // If you want to hide the admin customizer, return true
    // If you want to show the admin customizer, return false

    return $hide;
}

Please make sure to add this code to your theme's child functions.php file. Here is a guide on how to install the child theme : https://help.uicore.co/docs/child-theme

Once the child theme is active, you can start customizing it by adding this custom PHP code via "Appearance" > "Editor".

If you have any further questions or need assistance, feel free to ask.

Best regards, Andrei Voica