Support Forum

Empty profile tabs

JV Joan Alamo Vallejo
Joan Alamo Vallejo
Member

Hi there,

when I try to edit my profile, all tabs in the section are empty and if you click on them it takes you to a new page with the content but no css. Now, I’ve read somewhere it may be caused by a conflict with the jquery library in the theme.

I’ve tried to remove the script call on the WP header.php and add this code to the WP functions.php as recommended but then it crashes the design (as it couldn’t find the js)

<?php
function my_scripts_method() {
    wp_deregister_script( 'jquery' );
    wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js');
    wp_enqueue_script( 'jquery' );
}    
 
add_action('wp_enqueue_scripts', 'my_scripts_method');
?>
This is my homepage in case you need to see the code: http://www.subnoise.es
 

8 Answers

New Answer

MP Mr Papa
Mr Papa
Member

what you would want to do is really comment out those first two…

    wp_deregister_script( ‘jquery’ );
    wp_register_script( ‘jquery’, ‘http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js’);

then wp will loads its own jquery instead of the version from google…

YS Yellow Swordfish
Yellow Swordfish
Member

It is not fixed. There are 3 copies of jQuery being loaded – two of them bypassing the WP API and one of them being loaded direct from your theme.

I believe the other culprit may be some login plugin you are using but I can’t say for sure.

JV Joan Alamo Vallejo
Joan Alamo Vallejo
Member

If I add this to the functions.php as Mr Papa said

<?php
function my_scripts_method() {
    wp_enqueue_script( 'jquery' );
}    
 
add_action('wp_enqueue_scripts', 'my_scripts_method');
?>
and if I comment the call to my theme's jquery.min.js, the slide on my homepage stops working and it didn't fix the issues on the forum
I understand there should be only one jquery loaded but I don't know which one to keep
JV Joan Alamo Vallejo
Joan Alamo Vallejo
Member

I don’t know if it’s related or just got lucky but I forgot to call wp_footer() and now it seems to be working

MP Mr Papa
Mr Papa
Member

yup, that would cause it…  good find…  hate when themes dont follow the wp standards! wink

JV Joan Alamo Vallejo
Joan Alamo Vallejo
Member

I built the theme from a simple html, I hope I haven’t missed anything more

YS Yellow Swordfish
Yellow Swordfish
Member

Just shout if anything else doesn’t appear to work as it should and we will try and help.