Pro Theme Design Forum » Mimbo Pro » Technical Help

Big problem with WP 2.8.4

  • Started 10 months ago by Q-design
  • Latest reply from Ben
  • This topic is not a support question

Hi,
I found another problem using MimboPro 2.0 and Wordpress 2.8.4

Today I've installed the last version of WP and, when I try to add a new post, every button in the admin area disappeared.

This is what I get:

http://img59.imageshack.us/img59/6843/schermata20091002a13282.png

Notice that every plugin is switched off.

So I think there is a uncompatibility between Mimbo Pro and WP 2.8.4, because if I use the Default theme everything looks good.

Well... I found the problem.

It was not your theme, but my adding to theme_function.php

I had insert this code for load jquery from google repository:

function swap_jquery() {
wp_deregister_script('jquery');
wp_register_script('jquery','http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js');
wp_enqueue_script('jquery');
}
add_action('init', 'swap_jquery');

but with 2.8.4 it causes the mess.

When I deleted it, everything works fine.

Sorry for the unconvenient.

R

P.S.: do you know if there is a way to use the Google Repository instead of the stanard WP function wp_enqueue_script?

  • Ben
  • Ben
  • Posted 9 months ago #

WordPress uses a special version of jquery in the admin. You can use this code on the main website but you need to make sure you're not in the admin area. You can use is_admin to do this which would make sure your function look like this:

function swap_jquery() {
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery','http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js');
wp_enqueue_script('jquery');
}
}

FWIW Elemental does all this for you, out of the box :)

Reply

You must log in to post.