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 »

Styles dumped into Header.php transfer to stylesheet


 
Prev Previous Post   Next Post Next
  #1  
Old Aug 22, 2012, 06:51 PM
Newdust.com's Avatar
Newdust.com
 
16 posts · Nov 2009
Unhappy Styles dumped into Header.php transfer to stylesheet

Hello BFA,

I really don't like the dynamic CSS aspect of the Atahualpa theme for one reason only: it adds 650+ lines of code to the header.php file. For those of you who don't know what I'm talking about, here's an example:

PHP Code:
/* This is pulled straight from the header.php file */

a:link, a:visited, a:active {
    color: #<?php echo $bfa_ata_link_color?>
    font-weight: <?php echo $bfa_ata_link_weight?>
    text-decoration: <?php echo $bfa_ata_link_default_decoration?>
}
The rules are pulled from whatever is typed into the "Body, Text & Links" menu within the Atahualpa Theme Options.

CSS needs to be kept separate from HTML and PHP files. It's the proper way to do it, and it makes for cleaner front-end code. There has to be a better way for the Atahualpa theme to do this so as not to clog up our PHP files with something that shouldn't be in a PHP file to begin with. I've tried pulling all of the CSS declarations out of header.php and keeping them in a style.php file (based on an article I read at css-tricks.com - click here to read ). This did not work however - the PHP was not properly executed, almost as if it were automatically commented out of the file.

And so I wonder: has anyone successfully separated the CSS from the Header.php file into it's own file?
The obvious solution would be to just ignore the Atahualpa Theme Options as a means of editing the CSS, and just dumping the generated CSS into the style.css file. That would defeat the purpose of the Atahualpa Theme editor, which I think is a great feature that needs to stay intact.
 

Bookmarks

Tags
css, header.php, style, style & configuration



Similar Threads
Thread Thread Starter Forum Replies Last Post
Editing Styles in the Footer, Header, and all other pages petro7447 Header configuration & styling 6 Mar 30, 2012 06:17 PM
[SOLVED] Is editing header.php the only way to add an additional stylesheet? jonasgrumby Header configuration & styling 2 Feb 8, 2011 06:46 PM
CSS all dumped into the <head> of the files. Why? timware Atahualpa 3 Wordpress theme 17 Dec 12, 2010 05:07 PM
[SOLVED] re: forms &amp; table styles in particular the header cells Rashell Center area post/pages 1 Jan 22, 2010 04:12 AM
Help changing Header styles Shepherd Jim Header configuration & styling 1 Feb 20, 2009 11:19 AM


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


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