Support Forum

Join and Add a Topic buttons not working

26 Answers

New Answer

MP Mr Papa
Mr Papa
Member

there is probably some other code around those… but yeah, right place…

so can you also post a couple of lines of code from after each of those? 

SS Scott Schwab
Scott Schwab
Member

this is the list… you can see the google link right at the top of the list and the other is the third from the bottom of the list…

//add scripts

function my_jquery_scripts() {

if( !is_admin()){

   wp_deregister_script(‘jquery’);

   wp_register_script(‘jquery’, (“http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js”), false, ”);

   wp_enqueue_script(‘jquery’);

   wp_register_script(‘jquery-tools’, get_template_directory_uri() . ‘/js/jquery.tools.min.js’, false, ”, true);

   wp_enqueue_script(‘jquery-tools’);

   wp_register_script(‘isotope’, get_template_directory_uri() . ‘/js/jquery.isotope.js’, false, ”, true);

   wp_enqueue_script(‘isotope’);   

   wp_register_script(‘jquery-easing’, get_template_directory_uri() . ‘/js/jquery.easing.1.3.js’, false, ”, true);

   wp_enqueue_script(‘jquery-easing’);  

   wp_register_script(‘pretty-photo’, get_template_directory_uri() . ‘/js/jquery.prettyPhoto.js’, false, ”, true);

   wp_enqueue_script(‘pretty-photo’);

   wp_register_script(‘audio-player’, get_template_directory_uri() . ‘/audio_player/audio-player.js’, false, ”);

   wp_enqueue_script(‘audio-player’);

   wp_register_script(‘video-player’, get_template_directory_uri() . ‘/video_player/projekktor.min.js’, false, ”);

   wp_enqueue_script(‘video-player’);

   wp_register_script(‘hover-int’, get_template_directory_uri() . ‘/js/problem-with-post-edit-buttonoverIntent.js’, false, ”, true);

   wp_enqueue_script(‘hover-int’);

   wp_register_script(‘superfish’, get_template_directory_uri() . ‘/js/superfish.js’, false, ”, true);

   wp_enqueue_script(‘superfish’);  

   wp_register_script(‘jquery-mobile-customized’, get_template_directory_uri() . ‘/js/jquery.mobile.customized.min.js’, false, ”, true);

   wp_enqueue_script(‘jquery-mobile-customized’);

   wp_register_script(‘camera’, get_template_directory_uri() . ‘/js/camera.min.js’, false, ”, true);

   wp_enqueue_script(‘camera’);

   wp_register_script(‘elastislide’, get_template_directory_uri() . ‘/js/jquery.elastislide.js’, false, ”, true);

   wp_enqueue_script(‘elastislide’);

   wp_register_script(‘quovolver’, get_template_directory_uri() . ‘/js/jquery.quovolver.js’, false, ”, true);

   wp_enqueue_script(‘quovolver’);  

   wp_register_script(‘gmap-api’, (“http://maps.google.com/maps/api/js?sensor=false”), false, ”, true);

   wp_enqueue_script(‘gmap-api’);  

   wp_register_script(‘jquery-gmap’, get_template_directory_uri() . ‘/js/jquery.gmap-1.1.0-min.js’, false, ”, true);

   wp_enqueue_script(‘jquery-gmap’);  

   wp_register_script(‘jquery-ui’, get_template_directory_uri() . ‘/js/jquery-ui-1.8.11.custom.min.js’, false, ”, true);

   wp_enqueue_script(‘jquery-ui’);

   wp_register_script(‘mobile-menu’, get_template_directory_uri() . ‘/js/jquery.mobilemenu.js’, false, ”, true);

   wp_enqueue_script(‘mobile-menu’);

   wp_register_script(‘custom’, get_template_directory_uri() . ‘/js/custom.js’, false, ”, true);

   wp_enqueue_script(‘custom’);

}

}

SS Scott Schwab
Scott Schwab
Member

I hope the post with all that info doesn’t cause any problems eek

Awaiting moderation and all… lol

MP Mr Papa
Mr Papa
Member

lol. just wanted 1 or two lines around the ones of interest… but can make this do… wink

just comment out this line of code:

wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"), false, '');

then replace:

wp_register_script('jquery-ui', get_template_directory_uri() . '/js/jquery-ui-1.8.11.custom.min.js', false, '', true);
wp_enqueue_script('jquery-ui');

with

wp_enqueue_script('jquery-ui-core');
wp_enqueue_script('jquery-ui-widget');

then the jquery and jquery ui that comes with WP will be used instead of the conflicting versions

SS Scott Schwab
Scott Schwab
Member

I commented the one line out and replaced the other two lines, saved the functions.php file, refreshed the site and still no luck…

MP Mr Papa
Mr Papa
Member

oh… looks like you need to also comment out:

   wp_deregister_script(‘jquery’);

SS Scott Schwab
Scott Schwab
Member

This is what I did to comment the two lines out…

//wp_deregister_script(‘jquery’);
//wp_register_script(‘jquery’, (“http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js”), false, ”);

I also replaced the other two lines with:

wp_enqueue_script(‘jquery-ui-core’);
wp_enqueue_script(‘jquery-ui-widget’);

still no luck… aarrgghh!

I sent you a PM…

MP Mr Papa
Mr Papa
Member

yup… still throwing jquery errors… but getting better… this is the problem with using an outdated theme or one that does not follow the wp standards…

looking at the custom ui js loaded… lets try adding these:

wp_enqueue_script(‘jquery-ui-mouse’);
wp_enqueue_script(‘jquery-ui-tabs’);
wp_enqueue_script(‘jquery-effects-core’);
wp_enqueue_script(‘jquery-effects-fade’);

if that doesnt get it, you might have to edit the js of the theme to replace the $ namespace with jquery…

SS Scott Schwab
Scott Schwab
Member

You are my new best friend! laugh

THAT DID IT!!!!!!!

I just added a topic in a forum! Whoo Hoo!

Thank You for ALL your help!

MP Mr Papa
Mr Papa
Member

I see… glad we resolved it…

please be advised you should make a copy of your wp theme changes… should the plugin ever get updated to be current with wp, you would lose your changes…

SS Scott Schwab
Scott Schwab
Member

Great advice, I will!

Thanks Steve, you are a life-saver!

Time for a Corona and then I’m going to bed… I feel like a ton of bricks has been lifted from my shoulders!