• KyeLani

    (@kyelani)


    Hello,

    Thank you for Contact Form 7!

    I’ve pieced together bits of information to try to achieve this myself, but it doesn’t seem to be working. Perhaps someone can tell me why.

    in wp-config.php, I have (to stop scripts.js from loading from the plugin):

    define ('WPCF7_LOAD_JS', false);

    and in my child theme’s functions.php, I have (to load a copy of scripts.js – which I plan to edit – from my child theme):

    function add_my_scripts(){
        wp_register_script('wpcf7-js',
        get_bloginfo('stylesheet_directory').'/js/scripts.js');
        wp_enqueue_script('wpcf7-js');
    }
    add_action('init', 'add_my_scripts');

    As a result, as expected, the <head> block of my page contains :

    <script type="text/javascript" src="http://domain.com/wp-content/themes/theme_name/js/scripts.js?ver=3.5.1"></script>

    However, despite the fact that I’ve not yet made any changes to the copy of scripts.js that I’ve added to the relevant directory, the form no longer behaves as it did before I started fiddling.

    I know I must have made a mistake, but I know not where. Any help would be greatly appreciated. Thank you.

    http://wordpress.org/extend/plugins/contact-form-7/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Is jQuery loaded?

    Thread Starter KyeLani

    (@kyelani)

    Hello, thank you for your reply!

    jQuery is loaded, yes. The <head. of my page shows

    <script type="text/javascript" src="http://domain.com/wp-includes/js/jquery/jquery.js?ver=1.8.3"></script>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Replacing error overlays with restyled fields’ is closed to new replies.