• Resolved Ines

    (@wildfang)


    Hey,

    instead of loading the plugin files across the whole site, I’d like to load it only on specific page id’s.
    I noticed the plugin has several options, among these:
    “Only when shortcode [datetimepicker] exists on a page.”

    However, I haven’t been able to figure this one out. I am using cform 7 with the plugin. Any idea how I could make this work?

    Thanks!

Viewing 1 replies (of 1 total)
  • Hi @wildfang
    In the settings page, select the option you mention.
    Then on the page where you have the contact form 7, simply add
    [datetimepicker] anywhere. If you’re using the new block editor, add it as a shortcode block. If you’re using the classic editor, add it anywhere on the page, even after the content. This won’t display, it will just tell the script to load the files on that page.
    Check if it works.
    Greetings, Carlos

Viewing 1 replies (of 1 total)
  • The topic ‘Add JS/CSS only on specific pages’ is closed to new replies.