I have been using the following function to enqueue some CSS to my theme. However, they are used in the admin area as well:
wp_enqueue_style(...)
I don’t want them to be used in the admin area. Sadly I cannot find anything about that neither here nor on Google in combination with this function. The codex doesn’t explain it as well and the function does not support an option to apply to a specific style the exclusion of the admin area.
I hope somebody could tell me how to exclude a specific css from the admin area.
Thanks in advance.
There are a couple of options. One is to wrap the enqueue in a check to see if it is the admin.
The other is wait to enqueue the style until template_redirect.
You can make your enquques conditional, for example:
if( !is_admin() ) { wp_enquque_style( 'my_style' ) }
. Any of the conditional tags will work in this way.can you please show the exact code you’re using?
If you are doing something like this:
you could do this:
.. or you might want to look at http://codex.wordpress.org/Function_Reference/wp_deregister_style