751 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
CyberShot says

you need to try the code they posted. There is a reason to deregister the jquery

439 posts
  • Has been part of the Envato Community for over 2 years
  • Has sold $5,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Located in Europe
+1 more
Pixelous says

function my_scripts_method() {
    wp_register_script( 'my_script', get_template_directory_uri() . '/js/my_script'.js', array( 'jquery' ) );

    wp_enqueue_script( 'my_script' );
}
add_action( 'wp_enqueue_scripts', 'my_scripts_method', 1 );

What does number one means?

3221 posts
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
  • Has been part of the Envato Community for over 4 years
+1 more
organicbee says


function my_scripts_method() {
    wp_register_script( 'my_script', get_template_directory_uri() . '/js/my_script'.js', array( 'jquery' ) );

    wp_enqueue_script( 'my_script' );
}
add_action( 'wp_enqueue_scripts', 'my_scripts_method', 1 );

What does number one means?

sets the priority

http://codex.wordpress.org/Function_Reference/add_action
439 posts
  • Has been part of the Envato Community for over 2 years
  • Has sold $5,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Located in Europe
+1 more
Pixelous says

Thanks, OrganicBeeMedia, i’ll try it.

by
by
by
by
by
by