Atahualpa Easy Header Fix

with 32 Comments

The Atahualpa Easy Header Fix has many great features including…

  1. It protects custom header images, logo images and favicons during updates (even automatic updates).
  2. It is backwards compatible with all Atahualpa settings (it breaks no functionality).
  3. It works for Single Sites and Multi Site Sites and WP Multi Network Sites.
  4. It allows automatic updates of Atahualpa (from, which will not delete custom image files. (Truly automatic if merged into the Atahualpa code.)
  5. It includes uploading all per-site graphics, the headers, the the logo and the favicon.
  6. All image files are uploaded via the WP media uploader (no FTP access is needed).
  7. It uses standard WordPress functions to find the upload directory.
  8. It allows Sort and Shuffle modes for Multi Site and Multi Network as well as Single site mode.
  9. It allows Normal Default Settings for Atahualpa to function in a normal way.
  10. This Fix makes only nine very tiny changes in five easy to upload files with full documentation.

All in all it is a very nice Fix, super easy to use, stable, and, hopefully it will be considered for permanent inclusion into the Atahualpa Core Code.

Installing the Easy Header Fix

This fix is very stable, powerful and much easier to use! In fact, easy as One, Two, Three!

Step 1 ~ Download

Step 2 ~ Unzip

You know how to do that!

Step 3 ~ Upload

Just upload these files into your Atahualpa Theme directory on your server via FTP. (This is the only time you need FTP.  All uploads of image files will be handled by the Media Uploader inside of WordPress.)

This Fix contains six files.

One File is added, namely:
  • functions/bfa_ata_multisite.php
Four Files are modified, namely:
  • functions/bfa_rotating_header_images.php
  • functions/bfa_header_config.php
  • header.php
  • functions.php
One ReadMe File

This file documents and explains the fix including nine tiny modification, and where they are.


Note: The ReadMe file is for information only and does not need to be uploaded.

Configuring the Easy Header Fix


Upload Image Files to any Page or Post

Note: I suggest you use the ABOUT page! This makes them easy to find and change later.  However you can use any post, page or even go straight to the media uploader. The rest of this will assume we are using the About page to anchor our site images to.

NOTE: Some WP installs produce an upload path that is either /files/ or /wp-content/uploads/ and these paths are not acceptable in version 3.6.7 and below.

Please view the two character fix in the comment below.

From the About Page (edit screen) Click Upload/Image >> Add an Image

Upload all Headers, Logos and your Favicon in the same place makes it easy to maintain. The Header Files and the Logo File MUST be in the same location.

TAKE NOTE of the “File URL” and copy it!


TEST THESE URLs in your browser, you should see your images…

For this example case I will assume: (But you must use what your WordPress gives you!)



Note: If you have problems uploading .ico type files, login as Super Admin, navigate to the “Super Admin” menu “Options” >> Upload Settings >> Upload file types >> and add “ico” to what is already there.

Example: jpg jpeg png gif ico





Note: Important Rules For Header File Names…

1) Header files MUST begin with “header_”
2) Header files MUST NOT contain a dash (-)
3) Header files MUST NOT contain extra dots (.)

Note: The following are examples of WRONG file names…

header_be4.jpg ~ Contains a Dash
header_nice.1.jpg ~ Contains extra Dot
header2good_2.jpg ~ Does NOT start with “header_

Note: If you have no directory or folder to the right of /files/ or /uploads/ AND you are using version 3.6.7 or before, please see the two character fix in the comment section below.


Rotating Header Files and Logo Examples

Insert into:

Atahualpa Theme Options >>

Style & edit HEADER AREA >>

Show Logo Image?

1) Custom Headers and Custom Logo

In this case we have uploaded both a custom logo and one or more custom headers in the same folder.

From the Upload page we copied this…

The part in blue tells the theme where to find the header files.

2) Custom Headers and DEFAULT Logo


In this case we want to use our custom headers but the default logo, logo.png

One of our upload headers was…

We use the part after the domain name and before the file name and add the default logo from the theme as shown in blue and brown above.


3) Custom Headers and NO Logo


In this case we want to use one or more custom headers, but we want NO logo at all. Like in step two…

One of our upload headers was…

We use the part after the domain name and before the file name as shown in blue above.

4) DEFAULT Headers and Custom Logo


In this case we plan to use the default headers from the theme, but we want to use a Custom Logo.

This step is identical to step one, except we add a tilde~” to the beginning to tell the theme to use the default headers instead.

5) DEFAULT Headers and DEFAULT Logo


In this case we want to use the default headers and the default logo, just put in the default filename, logo.png

This is the standard startup for Atahualpa when it is first loaded.

6) DEFAULT Headers and NO Logo

(leave blank)

In this case we just want to configure our site to get rid of the default logo, and to use the default headers. Just delete everything in the box and leave it blank.


FAVICON Examples

Insert into:

Atahualpa Theme Options >>

Overall Style & Config. >>


1) Custom FAVICON

In this case we have uploaded both a custom Favicon called rx.ico (or anything you want).

From the Upload page we copied this…

This Favicon may actually be anywhere on the Internet that you have permission to use. So the Favicon does not have to be in the same location as the Logo and Headers.



In this cause we do NOT want to use a custom Favicon so we just leave it with the default value. We may also wish to choose one of the other file names included in the Atahualpa Theme and insert that file name here. This is the default setting.

Building on Success!

Do you want to know the History of this Fix?

32 Responses

  1. Andrew
    | Reply

    Hi Alan,

    Am I missing something? I just followed your instructions to install the easy header fix but my header images aren’t showing.

    I uploaded the images using the WordPress media uploader (and also from within a page) and the path I got was /wp-content/uploads/ and my filenames are header_1.jpg, header_2.jpg, etc.

    I don’t have a logo but, from reading your instructions, I *think* I need to enter the path “/wp-content/uploads/” into the Atahualpa Theme Options >> Style & edit HEADER AREA >> Show Logo Image? field anyway to indicate the path of my header images. Is that right?

    All that happens is that an invalid image is displayed in the logo area and the filename of that image is, which suggest your code isn’t kicking in.

    I’ve left it in place for now so you can see what I mean.


    • Lan
      | Reply

      Please review step one above carefully. Were you editing the about page of your site and upload from that edit page so they would be attached to the about page?

      Upload Image Files to any Page or Post
      Note: I suggest you use the ABOUT page!
      The rest of this will assume we are using the About page to anchor our site images to.
      From the About Page Click Upload/Image >> Add an Image

      These files MUST be attached to a page or post and you MUST have a directory to the right of…

      Site 1

      for example…

      Sites 2+

      for example…

      Uploading unattached files into the following directories should not work…


      If you edit the about page, and then upload from there, I would expect something more than you have…

      For example:
      For which your input would be…


      or something beyond the /wp-content/uploads/ directory on the first site.

      On the second and later sites these would be… /files/ example…


      Please be sure you were using the media uploader from WITHIN a page or post.

      For example, you go to posts, edit about and above your input box you click next to Upload/Insert

      The header files MUST be attached to a page or post. It determines where to look based on what is AFTER /files/ or /wp-content/uploads/

      It is my opinion the you uploaded the files directly, not attracted (Unattached) to a page or post.

  2. Jason Lewis
    | Reply


    I have the same problem as Alan above.

    Am I missing something?


    • Lan
      | Reply

      Yes, due to the way this looks for the directory, you cannot (currently) upload files to the following paths..


      The reason is the program parses out these to find the path to the header directory and then applies the test. Meaning these paths would default to blank or NO HEADER!

      Step 2
      6) DEFAULT Headers and NO Logo

      Obviously I need to test for this before parsing the string. I will try to add this to future releases.

      The work around is to only upload images while editing a page or post (upload within editing the about page for example).

      I amended the instructions (above) to include the work around until I can adjust the code.

  3. Lan
    | Reply

    If you like this, you may want to vote on “TO CODE”, a proposed new theme!

    To Code Theme!

  4. fendy
    | Reply

    I’ve followed your instruction about uploading the files to my ftp and replace them, but my header images are not rotating on page view (image on header change without any page refresh), but the image changes upon page refresh, how to deal with this? could you please help me??

    thank you for your attention and for the great customizable theme!

    • Lan
      | Reply

      If you uploaded your images via FTP they are likely in the wrong place. The way you want to upload photos is to FIRST click on Pages, then within Pages, Edit a page, for example I edit my “About” Page (but any page is ok). At the upper part (right under the “Permalink:”) it says “Upload/Insert” (if you are using English). Right next to it is an icon that when you point at it, its title is “Add an Image”. Click that image and upload your header files from there.

  5. Blake
    | Reply

    I uploaded the easy header fix, but there are still no spaces after commas and semicolons. What can I do?

  6. Andrew
    | Reply

    I finally got around to trying this again and it’s still not working for me Alan.

    I have a multisite setup and all the media files reside in my /files/ folder (even ones attached to pages) so, to make sure there’s something to the right of that, I created a sub-directory called /headerimages/source/ and placed my images there. The full path (via FTP) is /var/www/wp-content/blogs.dir/3/files/files/headerimages/source, where “3” is the id number of my target site. I’ve checked in a browser and my first image is displayed at

    I entered /files/headerimages/source/ in the Show Logo Image field, but – although I’m not getting any errors this time – my images are not displayed.

    I’m using Atahualpa 3.6.7 with the easy header fix applied.

    • Lan
      | Reply

      Hi Andrew,

      Sorry about the delay, I have had 5 funerals and a surgery this year – what a crazy dreadful year…

      Getting back on top of this…

      We, me and a few other programmers, are thinking / planning a fork for Atahualpa… called TuKod Soon to be arriving at

      We would like to add back in the ability to put php code in the theme (we believe there is a way that approves of), and add a better version of this fix, and to make this a public project for even more improvements, and to make automatic updates from work perfectly (they really can!) without problems!

      Your idea above would almost have worked…


      The problem I see in what you did is that the header file name is
      and not

      The header file MUST begin with header_ That underscore is extremely important! See the file naming rules in the “ROTATING HEADERS” section above.

      But let me get back to the way this SHOULD WORK…

      /files/ is actually interpreted.

      In your above example you say the path is:


      So deleting the headerimages/source you added, would yield a path to your /files/ directory of:

      With the first header being something like:

      When you loaded it via the image up-loader did it work? I mean can you view that address on a browser?

      That “should have worked” except the code I wrote expected some directory AFTER the /files/ directory. In your case there is none.

      So here is a tiny change…

      In the patch. there is a file I wrote and added called bfa_ata_multisite.php in the /functions/ folder.

      Line 19 says:

      if ( preg_match('@^(http://[^/]+/|/|~http://[^/]+/)(?:[^/]+/uploads|files)(/.+)(?:/)(.*)@i', $bfa_ata_multisite['logo'], $matches) ) {

      In your case line 19 should say:

      if ( preg_match('@^(http://[^/]+/|/|~http://[^/]+/)(?:[^/]+/uploads|files)(/?.*)(?:/)(.*)@i', $bfa_ata_multisite['logo'], $matches) ) {

      This is pretty complex so be very careful. Everything on that line has a LOT of meaning! You are looking for something that says:


      Then change the [+] to an [*] and add a [?] before the [.]. So it will look like this…


      It is only two letters, but it is a big change. This will allow it to work properly with or without folders after the /files/ folder.

      Andrew, this should allow your first test procedure to work (no need for ftp added folders) and this change will be incorporated into the project and the TuKod Theme.

      We may also release an Atahualpa 3.7.1 with the Easy Header Fix 3.7.1

  7. […] these instructions provided by a super smart guy. Now, I know it can seem like a lot, but it’s really not so […]

  8. Lesa
    | Reply

    I’d love to download your Easy Header Fix but I’m getting an “authentication required” screen. What do I have to do to get access?

  9. Mike G
    | Reply

    Help! I tried doing the easy header fix and all sorts of other errors popped up! I have not clue how to fix the PHP. I uploaded the 5 files into my them directory, I chose overwrite, and then all these error codes were written on the top of my site. I can’t export my setting either without a bunch of errors o 3.6.7. Any suggestions?!?!!? I’m sort of a newbie at this and it’s sort of freaking me out! I followed the directions as best I could to try to get a rotating header but this is the result:
    Here is an example line of text now at the top of my website:

    Warning: include_once() [function.include-once]: Unable to access /home/nofroli1/public_html/wp-content/themes/atahualpa367/functions/bfa_ata_multisite.php in /home/nofroli1/public_html/wp-content/themes/atahualpa367/functions.php on line 81
    Your advice is greatly appreciated!

    • Lan
      | Reply

      The error you have experienced here is telling you that WordPress cannot find one of the files called bfa_ata_multisite.php, this file is included in the fix. You can load another copy of the theme and try modifying it. We are working on a new release… That will be even easier to use.

  10. Mike G
    | Reply

    NM, I just upgraded my atahualpa and it seems to have fixed it. Now i just gotta get that rotating header working.

    • Lan
      | Reply

      Good news and Good luck with that!

  11. Jude
    | Reply

    Wow! Such a lovely information. I kept adding my logo in the right places but it failed to show up at http://dev…

    • Lan
      | Reply

      I checked you site and you seem to have figured out your error Jude, it looks good!

  12. Nick
    | Reply

    Can Easy Header Fix 3.6.7 applied to the latest release Atahualpa 3.7.1. ?

    • Lan
      | Reply

      No! Each version is specifically for one version of Atahualpa. However, a new release is coming soon… Read Welcome Back 2011

  13. Mauricio Roa
    | Reply

    Hi aLan!

    Thanks for your work. My question is if the Easy Header Fix works right with the Atahualpa 3.7.1 theme, as I see several indications for previous versions (3.6.7). Do I need to make some special patch or something else to make the fix works on 3.7.1?

    Regards from Chile.


    • Lan
      | Reply

      Hi Mauricio, and thanks for joining our site. As I explained in Welcome Back 2011, I have been taking a “vacation” getting some urgent surgery done. I am still running 3.6.7 as I have been mostly laying in bed. But upgrading to WP3.2.1 and also to Atahualpa 3.7.1 or whatever is the latest is high on my list to do this month! Much more is coming including the TuKod project is underway.

  14. Andy Pollock
    | Reply

    This is great. I sometimes make sites for people who don’t give me FTP access. I’m going to try combining it with the theme zipping them back up and uploading so I can avoid FTP altogether.

    • Lan
      | Reply

      @Andy Pollock

      Yes, the Tukod theme will be 100% no FTP after upload.

  15. Andy Pollock
    | Reply

    That worked. However if I do an automatic update of Atahualpa everything breaks and I lose the header image. Only thing I can do if I want to update Atahualpa is download the updated version, rebuild the zip file with the fix, delete the theme and then update again -fairly awkward.

    • Lan
      | Reply

      @Andy – We could not agree with you more! We have tried and tried to get this fixed in Atahualpa, and to fix it ourselves! Finally the TuKod Team decided to take this under their wing. It will be released with all the fixes! So you do not have to break and fix and break and fix all the time. The new TuKod Theme (TuKod is Cebuano for Support!) will even be one touch update safe from WordPress.Org

      The first install should be ready in a couple weeks, before the end of May for sure!

  16. Caroline Halliday
    | Reply

    Please can you give us an update for the release date of TuKod Theme.
    I have several websites I would like to use it on.
    Thank you for your work!

    • Lan
      | Reply

      Mid august. Now that things are starting to slow down after the twin big shake ups at MyDomain and Moniker (we had over 24,000 site records to change!), we are starting on the docs and hope to have this out Mid August – a beta version will be release at the beginning of August without docs on the site.

  17. Jeff VanDrimmelen
    | Reply

    Hey Lan, Thanks for this great update. Any word on the Tukod theme? Love to see what y’all are up to. We did an upgrade recently that broke all the theme headers and I would like to get them working again. Would love to just point folks to this as a solution.


    • Lan
      | Reply

      @Jeff VanDrimmelen – I wish I was faster on this – it sort of got pushed to the back burner for a few critical tasks (read that family crisis), however, renewed interests (and the need to update our 148 sites) will be moving ahead with this… Look for it in January 2013.

Leave a Reply