• 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 conditional

    if (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.

Viewing 1 replies (of 1 total)
  • Plugin Author Guido

    (@guido07111975)

    Hi,

    This is requested before a few years ago. Unfortunately I did not find a (simple) solution to auto-detect a form (shortcode) being active on a certain page or widget area.
    Yes, it’s also possible to make user select the contact form page via the settings page of the plugin or by using a shortcode attribute, but that’s a less nicer solution. And in that case I still have no solution for the widget.
    But as you already know, file size is almost negligible.

    Guido

Viewing 1 replies (of 1 total)
  • The topic ‘Restricting the loading of CSS to contact form pages’ is closed to new replies.