Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   [SOLVED] whats is the dynamic CSS in the Header.php? (http://forum.bytesforall.com/showthread.php?t=6904)

Briggsm8 Apr 27, 2010 10:27 PM

[SOLVED] whats is the dynamic CSS in the Header.php?
 
Soo i need to remove the dymanic css from the header.php but i don't know what the hell it looks like to be able to find it in the code..... just took me 20mins to find how to add this thread. ehh...

juggledad Apr 28, 2010 03:08 AM

What version of Atahualpa and wp?
What is your URL?

Why do you want to remove the CSS?

Briggsm8 Apr 28, 2010 05:15 PM

Heyy,

I have wp 2.9.2 and Atahualpa 3.4.6, what i am trying to do is speed up the site a little by cutting the css rules from the header in the websites code viewed in the browser and pasting it at the bottom of the style.css file in Atahualpa. That is what i have done so far, but it is telling me to remove the dynamic css from the header.php. The website is http://www.briggs-motor-repairs.com.au/

Here is the part i was just following and got stuck with.

- The actual CSS styles for Atahualpa3 are located in style.css and header.php
After you're totally done with all your customizations, you could view the source
code of your site in the browser, cut the CSS rules from the header section, and paste them at the
bottom of style.css. Then remove the dynamic CSS part from header.php. That would save around 8-12 kbyte per pageview.
It starts with:
<style type="text/css">
body {
<?php echo $bfa_ata['body_style']; ?>
}
Ends with:
background-image: url(<?php echo get_bloginfo('template_directory'); ?>/images/expand-down<?php echo ($bfa_ata['cat_menu_arrows'] == "white" ? "-white" : ""); ?>.gif);
}
<?php } ?>
<?php echo $bfa_ata['html_inserts_css']; ?>
</style>

Thanks, Andrew

juggledad Apr 29, 2010 07:54 AM

To use the CSS statically, here is what you should do.
1) set the CSS for INTERNAL (ato->Configure CSS & JS->CSS: External file or inline?
2) view a page then view the source of the page
3) copy the page source to a text editor
4) delete everything from the begining or the file to the line begining with <style type="text/css">

If you have ato->Configure CSS & JS->CSS: Compress? set to 'NO' it will be followed by
HTML Code:

/* ------------------------------------------------------------------
---------- BASE LAYOUT ----------------------------------------------
------------------------------------------------------------------ */

If you have ato->Configure CSS & JS->CSS: Compress? set to 'YES' it will be followed by one long line of CSS searting with
HTML Code:

body{text-align:center;margin:0;padding:0;.....
5) delete everything from the end of the css to the end of the file
6) delete the text '<style type="text/css">' at the begining
7) delete the text '</style>' at the end
8) copy the remainder and paste it to the end of style.css
9) edit header.php and find lines 9-11 which should look like this
HTML Code:

<?php # if ( $bfa_ata['css_external'] == "External" ) { ?>
<link rel="stylesheet" href="http:<?php echo $bfa_ata['get_option_home']; ?>/?bfa_ata_file=css" type="text/css" media="all" />
<?php } ?>

replace these lines with
HTML Code:

<link rel="stylesheet" href="http:yourdomain.com/wordpress/wp-content/ataualpa/style.css" type="text/css" media="all" />
make sure the url is correct and save the file

That's it. NOTE: If you change any options in the theme, you will have to rebuilt the style.css for them to show up.

Briggsm8 Apr 29, 2010 05:23 PM

Thank You Juggledad. Very helpful you do a good job:)

just for anyone else you need to change the css to external and make sure you check the link in <link rel="stylesheet" href="http:yourdomain.com/wordpress/wp-content/atahualpa/style.css" type="text/css" media="all" /> to see if you can see the css in your browser.

Andrew.


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

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