Restricting the loading of CSS to contact form pages
-
First off, I love this contact form plugin. It works well while adding minimal overhead. Excellent work!
The one area where I think this could be improved is to restrict the css to only load on contact pages. As it is currently, the css file is enqueued and loaded on every post/page.I’ve simply been commenting out the enqueuing of the css from the plugin.
// wp_enqueue_style('vscf_style', plugins_url('/css/vscf-style.min.css',FILE));
and then manually loading styles through a conditionalif (is_page('pagenumber')) {<style>#vscf vscf:after etc...</style>}
Even a simple option to manually enter or select from a list of pages to load the plugin resources from would be nice.
- The topic ‘Restricting the loading of CSS to contact form pages’ is closed to new replies.