Load scripts only if the current user is admin using the wp_enqueue_script
-
I’m currently using one plugin that loads too many javascript and css files on my site using the wp_enqueue_script function, but these files aren’t necessary for ordinary users, but only for administarors. How can I prenets these scripts loading if the current user isn’t admin in order to reduce the page load time?
Thanks in advance
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Load scripts only if the current user is admin using the wp_enqueue_script’ is closed to new replies.