Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

Clickable banner link, searched without success

Old Jun 27, 2010, 12:05 AM
3 posts · Jun 2010
Troy, Michigan USA
Thanks for this great theme! I am getting close to having my site done, and am stumped on one thing, how to make my banner link to an external web site. I've searched the forum, and thought I had the answer at http://forum.bytesforall.com/showthread.php?t=1926.

I have not been able to make this work. It causes an error that makes the site inaccessible until I upload the version I saved of the file. I am using Atahualpa version 3.4.9 and WP 2.9, and I have made the header image clickable. Is there updated code, or another place in the file to edit, since the post I reference above indicates it works up through 3.4.4?
Old Jun 27, 2010, 10:23 AM
272 posts · Feb 2009
Can you post your before and after code? At first glance that should still be working.

Old Jun 27, 2010, 04:53 PM
3 posts · Jun 2010
Troy, Michigan USA
The section of code that the information in the post referenced is below. I've highlighted the line that was suggested as the change to make the banner link to an external site:

// Header Image
if ( strpos($header_items,'%image') !== FALSE ) {


$bfa_header_images = bfa_rotating_header_images();

echo '<div id="imagecontainer" class="header-image-container" style="background: url(' .
$bfa_header_images[array_rand($bfa_header_images)] . ') ' . $bfa_ata['headerimage_alignment'] . ' no-repeat;">';

if ($bfa_ata['header_image_clickable'] == "Yes") {
echo '<div class="clickable"><a class="divclick" title="';
bloginfo('name'); echo '" href ="'; bloginfo('url'); echo '/">&nbsp;</a></div>';


if ( $bfa_ata['header_opacity_left'] != 0 AND $bfa_ata['header_opacity_left'] != '' ) {
echo '<div class="opacityleft">&nbsp;</div>';

if ( $bfa_ata['header_opacity_right'] != 0 AND $bfa_ata['header_opacity_right'] != '' ) {
echo '<div class="opacityright">&nbsp;</div>';
// END: If Header Opacity

if ( $bfa_ata['overlay_blog_title'] == "Yes" OR $bfa_ata['overlay_blog_tagline'] == "Yes" ) {
echo '<div class="titleoverlay">';
if ($bfa_ata['overlay_blog_title'] == "Yes") {
echo '<h' . $bfa_ata['h_blogtitle'] . ' class="blogtitle"><a href="'; bloginfo('url'); echo '/">';
bloginfo('name'); echo '</a></h' . $bfa_ata['h_blogtitle'] . '>';
if ($bfa_ata['overlay_blog_tagline'] == "Yes") {
echo '<p class="tagline">'; bloginfo('description'); echo '</p>';
echo '</div>';

echo '</div>';

$header_image = ob_get_contents();


I would really appreciate any help you or others can provide. Right now it links back to my home page, and I want to send a click to the Pepsi Refresh site.


Last edited by cjfelton; Jun 27, 2010 at 04:55 PM. Reason: font size
Old Jun 27, 2010, 09:13 PM
lmilesw's Avatar
10,174 posts · Jul 2009
Central New York State USA
Another way to accomplish this would be to put a new widget area in the header and use a widget with a hyperlinked banner immage.
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
Old Jun 27, 2010, 11:08 PM
272 posts · Feb 2009
I think Larry's suggestion would be easier.


if ($bfa_ata['header_image_clickable'] == "Yes") {
echo '<div class="clickable"><a class="divclick" title="';
bloginfo('name'); echo '" href ="'http://then'/">&nbsp;</a></div>';
If we go by the instructions in the referenced post, I think it would change to this:

if ($bfa_ata['header_image_clickable'] == "Yes") {
echo '<div class="clickable"><a class="divclick" title="';
bloginfo('name'); echo '" href ="'http://thenewurl.com'/">&nbsp;</a></div>';
Is that what you tried?

Anyway...I still think Larry's suggestion would probably be the easiest to achieve what it is you'd like, without editing the actual theme code.

The disadvantage to editing the theme code is that when you update, you'll need to complete the same edits again on the new version.

With using the widget area, that would transfer over with any updates you do.

(Brilliant thinking, Larry. )


Old Jun 28, 2010, 03:23 AM
juggledad's Avatar
23,632 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
in version 3.4.9-3.5.1 change line 301 from
HTML Code:
		bloginfo('name'); echo '" href ="'; bloginfo('url'); echo '/">&nbsp;</a></div>';
HTML Code:
		bloginfo('name'); echo '" href ="http://yourdomain.com" /">&nbsp;</a></div>';
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
Old Jun 28, 2010, 04:04 PM
3 posts · Jun 2010
Troy, Michigan USA
Thanks all, I decided to go with JD's suggestion because I was familiar with this section of the file and I have a rapidly approaching deadline. Worked like a charm, a one minute fix, and I had even acquired the knowledge in the last couple of days to add the code to open the link in a new window. This forum has been incredibly helpful, and a donation is on the way to you JD as soon as my site is done tomorrow.
Old Oct 8, 2010, 02:28 AM
hartsook's Avatar
7 posts · Sep 2010
Oakland CA
Send a message via AIM to hartsook Send a message via Skype™ to hartsook
I decided to use the suggestion to add a custom header widget area to add a link to the logo image in order to avoid having to reapply code patches each version upgrade. But positioning the image is tricky.

Iit sure would be nice if the theme were to support separate external href links for the logo and header images


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding a category from index : success but posts unreachables vil2 Excerpts, Read more, Pagination 2 Jan 24, 2010 03:41 PM
search box results giving the same result no matter what searched Dani808 Customization, Design, Programming... 5 Dec 31, 2009 07:50 PM
How to design clickable icons in right of banner image JGalt Header configuration & styling 2 Nov 30, 2009 11:50 PM
Success in integrating Flash page menu links? rinoa3108 Page & Category Menu Bars 0 Oct 25, 2009 11:40 PM
[SOLVED] Making Sidebar image 'clickable' (link it) marco Sidebars & Widgets 3 Jul 23, 2009 07:00 AM

All times are GMT -6. The time now is 02:50 PM.

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