getting jQuery and scripts to work
-
Hello all.
I am having problems getting my scripts to run. I have read through past posts on this issue, but I am still very confused as to what the problem is. Here is my code in functions.php
‘
function mytheme_dequeue_fonts() {
wp_dequeue_style( ‘twentytwelve-fonts’ );
wp_enqueue_style( ‘lustitana_400’, “fonts.googleapis.com/css?family=Lusitana:400,700”);
wp_enqueue_style( ‘lustitana_700’, “fonts.googleapis.com/css?family=Lusitana:400,700”);
if( !is_admin()){
wp_deregister_script(‘jquery’);
wp_register_script(‘jquery’, (“http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js”), false, ‘1.7.1’);
wp_enqueue_script(‘jquery’);
wp_deregister_script(‘jquery-ui’);
wp_register_script(‘jquery-ui’,(“http//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js”), false, ‘1.8.16’);
wp_enqueue_script(‘jquery-ui’);
wp_enqueue_script( ‘script1’, get_stylesheet_uri() . ‘/js/ch_script.js’, array( ‘jquery’ ));
}
}
add_action( ‘wp_enqueue_scripts’, ‘mytheme_dequeue_fonts’, 11 );
‘And here is the error messages I am getting….
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost/chfonts.googleapis.com/css?family=Lusitana%3A400%2C700&ver=3.5.1
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost/chhttp//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js?ver=1.8.16
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost/ch/wp-content/themes/campbellhouse/style.css/js/ch_script.js?ver=3.5.1Thanks!
The topic ‘getting jQuery and scripts to work’ is closed to new replies.