Convert JQuery to JavaScript

I don’t have that in my funtions.php. The only code I have similar to that is this:

     if ( apply_filters( 'wp_auth_check_load', $show, $screen ) ) {
	wp_enqueue_style( 'wp-auth-check' );
	wp_enqueue_script( 'wp-auth-check' );

	add_action( 'admin_print_footer_scripts', 'wp_auth_check_html', 5 );
	add_action( 'wp_print_footer_scripts', 'wp_auth_check_html', 5 );

I’ll just leave it, as it clashes with the menu on the mobile site. Thanks to all of you for trying to help, much appreciated.

ok…just going to pass this along in case you might need it later in functions.php you should have function like this.

/**
 * Enqueue scripts and styles.
 */
function agileart_scripts() {
	wp_enqueue_style( 'agileart-style', get_stylesheet_uri() );
	wp_enqueue_script( 'agileart-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );
	wp_enqueue_script( 'agileart-query', get_template_directory_uri() . '/js/jquery-1.11.3.min.js', array(), '20151028', true );
	wp_enqueue_script( 'agileart-queryui', get_template_directory_uri() . '/js/jquery-ui.min.js', array(), '20151028', true );
	wp_enqueue_script( 'agileart-uiJs', get_template_directory_uri() . '/js/ui.js', array(), '20151028', true );
	wp_enqueue_script( 'agileart-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );

	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
		wp_enqueue_script( 'comment-reply' );
	}
}
add_action( 'wp_enqueue_scripts', 'agileart_scripts' );

That is where you would want to enque you script. So in your case it might look like

wp_enqueue_script( 'NAMEOFYOURTHEME-query', get_template_directory_uri() . '/js/jquery-1.11.3.min.js', array(), '20151028', true );

You could do the same for any addy js script as well.

wp_enqueue_script( 'NAMEOFYOURTHEME-awesomescript', get_template_directory_uri() . '/js/awesomescript.js', array(), '20151028', false );

In case you want to try this…THIS Is very IMPORTANT (from personal experience) make sure you make a copy of your functions.php.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.