WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to call multiple JQuery scripts using wp_enqueue_script. The call to JQuery works perfectly but the second call to cufon doesn't. I'm not a php or javascript expert - could anyone lend a hand, is there a best practice method for this?

function my_init_method() {
    if (!is_admin()) {
        wp_deregister_script( 'jquery' );
        wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js');
        wp_enqueue_script( 'jquery' );

add_action('init', 'my_init_method');

function my_init_method2() {
    if (!is_admin()) {
        wp_deregister_script( 'cufon' );
        wp_register_script( 'cufon', 'http://mydomain.com/wp-content/themes/simplefolio/js/cufon-yui.js');
        wp_enqueue_script( 'cufon' );

add_action('init', 'my_init_method2');
share|improve this question
up vote 1 down vote accepted

I'm not good at this, but it could be because Cufon is not included in Wordpress?

So, you are deregistrating a script that is not included..


share|improve this answer
Hit the nail on the head! – toomanyairmiles Mar 12 '11 at 17:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.