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


  #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.
  #2  
Old Aug 22, 2012, 07:20 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
There is no CSS in header.php - there is CSS in css.php which builds the css style sheet inline or as an external file, but no css in the header.php code. If you have actual css there you might want to load down a new version and do a file compare.

and what version of atahualpa are you using

if you don't like the dynamic nature of the CSS you could always save it external and then remove the code that creates it. There is an old post explaining how to do that.

of course if you change a setting it won't be reflected so you'll have to put the code back in to recreate the file and then pull the code back out.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Aug 22, 2012 at 07:23 PM.
  #3  
Old Aug 22, 2012, 09:26 PM
Newdust.com's Avatar
Newdust.com
 
16 posts · Nov 2009
That must have been addressed in a later version. I'm on 3.2, which states that the "CSS is spread over two files: header.php and style.css . . . header.php contains the dynamic CSS."

In that case I'll either update find the old post you mentioned that details the removal of the dynamic CSS.
  #4  
Old Aug 23, 2012, 04:14 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
3.2!!! Wow you really need to upgrade. The current version is 3.7.7
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


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:33 PM.


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