Functions.php is_admin X/Pro equivalent

Hi Themeco,

Is there an equivalent to WordPress is_admin for X/Pro that can be used to prevent wp_enqueue_style CSS and wp_enqueue_script JS being loaded in the X/Pro builders and conversely to only enqueue them in the X/Pro builders?

Hello @strobley,

Thanks for writing in! We do not have such function in the theme. We only use WordPress enqueue function classes.

If there is a need that you need a certain CSS/JS file in the admin area only, you may use the following:

Note: If you are unfamiliar with code and resolving potential conflicts, you may select our One or Care service for further assistance. We are unable to provide support for customizations under our Support Policy.

Best Regards.

thanks, I’m aware of admin_enqueque - I want to disable or enable scripts specificall for the X/Pro builders.

Hello @strobley,

If you disable all the CSS/JS files in the admin area, the Pro editor, Theme Options Preview and the Customizer Preview will no longer display the site correctly.

Regretfully we do not have any equivalent is_admin() function in the theme. We only rely on the WordPress functions. Please be aware that custom coding is beyond the scope of our support. You may need to contact 3rd party developer to do what you have in mind.

Thank you for your understanding.

thanks @ruenel I simply want to disable some enqueue CSS and JS files from the builders as they impact designing with the builders but are perfectly correct for the frontend.

You are most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.