WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7 Datepicker
Load Script/Enqueue Script not working (2 posts)

  1. Sina
    Member
    Posted 1 year ago #

    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.

  2. cblockmedia
    Member
    Posted 10 months ago #

    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' );

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.