wp_enqueue_script problem!
-
Hi There,
I’m trying to use wp_enqueue_script on my theme, to insert 3 javascript files on my page.
function mr_forms() { wp_register_script('validate-jquery', get_bloginfo('template_url') . '/js/jquery.validate.min.js', array('jquery'),FALSE,TRUE); wp_enqueue_script('validate-jquery'); wp_register_script('aditional-methods', get_bloginfo('template_url') . '/js/additional-methods.min.js', array('jquery','validate'),FALSE,TRUE); wp_enqueue_script('aditional-methods'); wp_register_script('messages-ptbr', get_bloginfo('template_url') . '/js/messages_ptbr.js', array('jquery','validate'),FALSE,TRUE); wp_enqueue_script('messages-ptbr'); wp_register_script('forms', get_bloginfo('template_url') . '/js/forms.js', array('jquery', 'maskedinput'), FALSE, TRUE); wp_enqueue_script('forms'); } add_action('init', 'mr_forms');
But only the last javascript, “forms.js” is being inserted on my page, the others arent, does anyone know what might be happening ? and the other doesnt matter…
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘wp_enqueue_script problem!’ is closed to new replies.