All Posts by Email, Once a Week

Media Temple logo

CSS-Tricks is brought to you in part by Media Temple, the web hosting that we both use and recommend.

Use Google-Hosted JavaScript Libraries (…still the Right Way

  • # October 30, 2009 at 3:46 pm

    Hello All!

    I’m farely new at messing around with WordPress and in a recent screen-cast #73, Chris showed how load Google-Hosted JQuery in the WordPress function.php page and Chris also has a post on Digging into WordPress about this too, ). In that a article they mention using the "admin_is" conditional tip so as not too mess up the Rich-text editor on the admin side. Unfortunately, I’m fairly new to WordPress and don’t know how to go about doing this. Can someone help me do that?

    Here is my function.php file:

    < ?php automatic_feed_links(); if( !is_admin()){ wp_deregister_script('jquery'); wp_register_script('jquery', (""), false, '1.3.2'); wp_enqueue_script('jquery'); } if ( function_exists('register_sidebar') ) { register_sidebar(array( 'before_widget' => ‘
  • ‘,
    ‘after_widget’ => ‘
  • ‘,
    ‘before_title’ => ‘

    ‘after_title’ => ‘


And here is my header.php file:

< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">


Any help someone could give me would be great! My Admin is messed up because of this.


# October 30, 2009 at 5:51 pm

Okay, so I just realized that I have the "is_admin" conditional statement in there. So, that is not it. Here are the warnings I’m getting on the admin side:

Warning: Cannot modify header information – headers already sent by (output started at /home/newhop9/public_html/newsite/wp-content/themes/NHFC/functions.php:1) in /home/newhop9/public_html/newsite/wp-includes/classes.php on line 1586

Warning: Cannot modify header information – headers already sent by (output started at /home/newhop9/public_html/newsite/wp-content/themes/NHFC/functions.php:1) in /home/newhop9/public_html/newsite/wp-includes/pluggable.php on line 865

So, if anyone can help me out. That would be awesome!


# October 30, 2009 at 8:35 pm

Could you try running through your plugins and other code to see if it’s not one of them causing an error? Everything on the script you provided should work.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed