Is this for a theme to be hosted in the WordPress.org directory?
Plugins and themes hosted on WordPress.org are not supposed to add their own jQuery libraries. Additionally, any code that “phones home” requires opt-in consent.
@roosw19
Add the following code on function.php & that should help you.
function themeslug_enqueue_script() {
wp_enqueue_script( 'jquery-v-2', 'http://code.jquery.com/jquery-2.1.3.min.js', false ); //External Link
wp_enqueue_script( 'mycustomJs', get_template_directory_uri() . '/default.js', false );
// here you can enqueue more js / css files
}
add_action( 'wp_enqueue_scripts', 'themeslug_enqueue_script' );
-
This reply was modified 5 years, 10 months ago by
Sundar.
-
This reply was modified 5 years, 10 months ago by
Sundar.