This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Questions Regarding CSS Handling and Few Other Things

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Questions Regarding CSS Handling and Few Other Things Reply To: Questions Regarding CSS Handling and Few Other Things

#26394
Ernest MarcinkoErnest Marcinko
Keymaster

Okay, there is a lot of confusion here, I will try to clarify as much as I can.

Case 1 – When the conditional CSS loader is ON
When you turn ON this option, the plugin WILL NOT enqueue any stylesheet files on the server side, so there is no point of trying to de-queue anything here. There is a few lines of static inline CSS placed in the header to prefent FOUC issues, but that is negligible.
In this case the plugin uses the style.basic-{args}.css file and the separate instance CSS files (search1.css, search2.css etc..), depending on which search is visible on the given page. This feature is extremely helpful for cases, when there are a lot of search bars created (like our demo page), and you don’t want all the CSS loaded up in a single file, all at once.
Once again, if this option is active, nothing has to be dequeued, as nothing is enqueued. Everything is handled on the front-end via javascript – during the page load asynchronously. If you want to manage all the CSS yourself, then there is no point of using this feature whatsoever.

Case 2 (default) – When the conditional loader is off
In this case the style.instances-{args}.css file is enqueued on the server side – this one contains the basic CSS as well as all the search instane CSS code.
You can dequeue this with the code you have above, it does not matter what the file name is. In WordPress you dequeue by the handle name, not the file name, as the file name can be different for each condition.
You can take the CSS content from the style.instances.css file, and copy it wherever you need, and use that code above to dequeue the plugin CSS.