Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

Atahualpa theme java script problem


  #1  
Old May 1, 2009, 02:37 PM
adventoutpost
 
4 posts · May 2009
This theme is great btw but I am having a small problem...
My site is running extremely slow so I used YSlow to find out what the problem was. I recieve an over all grade of "E" and it said that one of my major problems was that I had java scripts in the head document. That the rest of the page wont load until the java script loads. Where can I move my java scripts to without trashing my site?

My site is : adventoutpost.com

Here is what YSlow said:
----------------------------------------------
Grade F on Put JavaScript at bottom

There are 13 Javacript scriptss found in the head of the document

* http://pagead2.googlesyndication.com/pagead/show_ads.js
* http://adventoutpost.com/wp-content/...n_utilities.js
* http://adventoutpost.com/wp-includes...ery/jquery.js?...
* http://adventoutpost.com/wp-content/...r-reloaded.js?...
* http://adventoutpost.com/wp-content/...tools.v1.11.js
* http://adventoutpost.com/wp-content/...gallery.js.php
* http://adventoutpost.com/wp-content/...transitions.js
* http://adventoutpost.com/wp-includes/js/tw-sack.js?...
* http://adventoutpost.com/wp-content/...-js-packed.js?...
* http://adventoutpost.com/wp-content/...js/wpsf-js.php
* http://lite.piclens.com/current/piclens_optimized.js
* http://www.intensedebate.com/js/getCommentCounts.php?...
* http://www.intensedebate.com/js/countIt.php?...


JavaScript scripts block parallel downloads; that is, when a script is downloading, the browser will not start any other downloads. To help the page load faster, move scripts to the bottom of the page if they are deferrable.
--------------------------------------------------
  #2  
Old May 1, 2009, 03:44 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
2/3 of those JS files are from plugins. Try the PHP Speedy plugin to combine all of them into one single file. It would combines all CSS files into one too. You probably have many CSS files, too, so in your case the savings in server hits should easily outweigh the CPU processing required for PHP Speedy
  #3  
Old May 1, 2009, 04:11 PM
adventoutpost
 
4 posts · May 2009
PHP Speedy doesnt seem to work. When I activate it my site (adventoutpost.com) does not load at all (white screen) and in the PHP Speedy test cong section it says "PHP Speedy didn't find any JavaScript or CSS "
  #4  
Old May 1, 2009, 07:05 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
You can manually combine CSS and Javascript files and/or change their order. To remove the single files from the header look into the PHP files of the plugins you use for all the "actions" they add to "wp_head", something like (Example is from WPG2 plugin):

add_action('wp_head', 'wpg2_lightboxheader');

// Add G2 Header Elements
add_action('wp_head', 'g2_addheader');

Then add this at the bottom of atahualpa332/functions.php

PHP Code:
<?php
remove_action
('wp_head','g2_addheader',1);
remove_action('wp_head','wpg2_lightboxheader',1);
?>
  #5  
Old May 1, 2009, 09:45 PM
adventoutpost
 
4 posts · May 2009
Ok so just be clear:

Look through all my active plugins for add_action('wp_head', 'something');

then I add <?php
remove_action('wp_head','something',1);
remove_action('wp_head','something',1);
?>

with names corresponding to the plugins?????
  #6  
Old May 1, 2009, 10:59 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Yes, but regarding "names corresponding to the plugins" - the names of the actions can be anything and may not "correspond to the plugins" at all. You'll simply look through the files of each plugin to find all the add_action('wp_head', 'action_name') action names

http://www.google.com/search?q=wordp...action+wp_head
  #7  
Old May 1, 2009, 11:10 PM
adventoutpost
 
4 posts · May 2009
Ok... So I followed your steps...

and now I cant log in. All I see is a white screen and can do anything...
  #8  
Old May 2, 2009, 02:28 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Change the theme directory name from atahualpa332 to something else, through FTP.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Installation problem: theme is visible but Atahualpa options panel doesn't w mkny13 New Versions, & Updating 6 Apr 30, 2009 10:09 AM
Problem editing the theme Jerry Atahualpa 3 Wordpress theme 4 Mar 31, 2009 11:51 AM
How to use export.php script file to save theme changes? Andante New Versions, & Updating 1 Mar 22, 2009 07:36 PM
[SOLVED] WP Question, not a theme problem doug86 Atahualpa 3 Wordpress theme 2 Feb 12, 2009 10:22 PM
[SOLVED] Inserting Java (video) script so it stays in the middle column....help UmpireBugsy Atahualpa 3 Wordpress theme 2 Feb 12, 2009 09:47 PM


All times are GMT -6. The time now is 12:14 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.