Thread Starter
wpate
(@wpate)
For more context, I have added the Search form via its shortcode on my page using Elementor shortcode widget. Let me know if you need more details.
Thread Starter
wpate
(@wpate)
I have played with the plugin even more and I am understanding more and more about it including the use of shortcodes.
From my investigation, the custom CSS only gets loaded on pages that are attached to the shortcodes. If I create a new page and use the VikRentCar widgets, the custom CSS is not loaded. I need this. My solution was to override the PHP file to call the vikrentcar_custom.css. This works, however, it seems like I am not getting the most recent version of this file. Is this file cached?
I would not want to add my custom CSS on the WordPress Additional CSS section and keep it in VikRentCar custom CSS.
I need this because another plugin is conflicting with vikrentcar css. So for now, I am unable to use the Search Form widget.
Please let me know if there are any solutions or alternatives
Hi,
Thanks for your messages. Our plugin will only load the apposite CSS file for customization, either the one for the website front-end section or the one for the wp-admin section, on pages that rendered directly by VikRentCar. This means that the back-end section will only load the CSS for customization when VikRentCar is the active plugin, while the front-end will load the CSS you’re looking for only on pages generated through its Shortcodes. This is to not interfere with third-party plugins, which you’ve noticed can cause conflicts. Although most CSS class selectors of VikRentCar are usually prefixed with vrc- or similar, it would be still a waste of resources to load a CSS file on pages that do not require it. This is exactly what your other plugin is erroneously doing.
That said, this practice may not result handy when you want to customize a Widget/Block in the home page of your website, because as you’ve noticed, the main CSS file for customization is not available there. It’s only loaded on pages that contain Shortcodes.
If you need to apply custom CSS rules to a home-page Widget/Block of VikRentCar, like the “Search Form”, then our suggestion is to place such rules directly in your Theme. Instead, for CSS customization related to pages (Shortcodes) or to the booking process of VikRentCar, you’re free to use the apposite CSS file.
Please notice that the apposite CSS files for customization will be cached by your own browser or server. Our framework will only append the plugin version to the CSS asset URI, like /vikrentcar_custom.css?1.4.x and this technique is used to invalidate the CSS cache upon installing newer plugin versions. If you’ve detected cached versions of the file loaded by the browser, then VikRentCar is not responsible for that caching.
Lastly, it is fundamental to not modify the custom CSS files through FTP, but rather through the apposite back-end interface. This is because the back-end interface will save a copy of the CSS customization onto the database, and after installing a new plugin version, the source code will be restored automatically. If you modify the custom CSS files through FTP instead, every plugin update will make you lose your changes.
We hope this helps!
The VikWP Team