WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Contact Form 7 Datepicker] Load Script/Enqueue Script not working

[Plugin: Contact Form 7 Datepicker] Load Script/Enqueue Script not working

  • Sina
    Member

    @tinath

    The enqueue options as shown on the Changelog page, doesn’t appear to be working.

    if (is_page('Form page')) {
        if (function_exists('CF7DatePicker'))
           add_action('wp_enqueue_scripts', array('CF7DatePicker', 'plugin_enqueues'));
    }

    or

    function cf7dp_enqueues() {
        if (is_page('Form page')) {
            if (function_exists('CF7DatePicker'))
                CF7DatePicker::plugin_enqueues();
        }
    }
    add_action('init', 'cf7dp_enqueues');

    I’ve tried both replacing ‘Form page’ with the page the Date Picker is being used on, but it won’t appear.

    Any idea would be greatly appreciated.

Viewing 1 replies (of 1 total)
  • cblockmedia
    Member

    @cblockmedia

    I am having issues getting my code to work! Each works independently, but not collectively… Any help?

    function nix_scripts()
    {
    wp_enqueue_script( ‘toggle’, get_template_directory_uri() . ‘/js/toggle.js’, array( ‘jquery’) );

    wp_enqueue_script( ‘tabs’, get_template_directory_uri() . ‘/js/tabs.js’, array( ‘jquery’) );

    wp_enqueue_script( ‘accordion’, get_template_directory_uri() . ‘/js/accordion.js’, array( ‘jquery’) );
    }

    add_action( ‘init’, ‘nix_scripts’ );

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Contact Form 7 Datepicker] Load Script/Enqueue Script not working’ is closed to new replies.