Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   CSS and Header (http://forum.bytesforall.com/showthread.php?t=1527)

pctechb May 3, 2009 07:52 AM

CSS and Header
 
I am confused about what to remove from the header.php file to get rid of the hundreds of lines of extra code in my page source.

I view the source on my working page, copy the style beginning with <style and ending with </style> and add this to the bottom of the CSS file. But when I remove that from the header.php, again, beginning with <style> and ending with </style> I get header errors.

Can you elaborate what to add and remove from the CSS and header.php? The site is setup how I want, but the page size is huge. Thanks.

juggledad May 3, 2009 12:58 PM

header.php is code that generates the html for the heaqder area of the page. You should not edit that unless you know PHP and what you are doing.

The source code of your page is dynamically generated each time you visit the site and depending on the widgets and plugins you have installed, the images audio, video etc that you may have in a post. If you choose to have a sidebar on one page, but not another, the code generated will be different.

How do you know that the hundreds of lines of code are extra?

(also give the url for your site so someone might look at it)

pctechb May 3, 2009 02:25 PM

Hey, Juggledad. Referencing external stylesheets has been mention here before http://forum.bytesforall.com/showthr...css+header.php
And I actually managed to do it once before but can't recall exactly what I removed. The resulting size of the page is much smaller and loads faster.

Having used Dreamweaver for several years it was easy to link to an external CSS file. I'm just not sure how to do it here as explained in the other posts.

juggledad May 3, 2009 05:01 PM

there are two <style> ...</style> sections in header.php I think you just want to remove them both, just not the lines between. Remember if you ever update the theme or reload the theme code, you will have to perform the edit again.

Flynn May 5, 2009 05:18 PM

It starts with

PHP Code:

<style type="text/css">
body {
    <?php echo $bfa_ata['body_style']; ?>
    }

and ends with (similar to this in older theme versions:)

PHP Code:

    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>



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

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