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 »

Custom link in RSS box


  #1  
Old Mar 29, 2010, 01:06 PM
Plainzero
 
4 posts · Feb 2010
Custom link in RSS box

Hello all, first off I'd like to say thanks to the good people here who have been most helpful with my previous questions with Atahualpa. I have one last question that I'm hoping has an easy solution, my client would like to place a twitter image link alongside the RSS feed and Comment buttons, can anyone point me in the right direction?

WP Version: 2.9.1
ATA Version: 3.4.5
  #2  
Old Apr 3, 2010, 04:54 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you will need to add some code into bfa_header_config.php
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Apr 3, 2010, 10:36 PM
hexink
 
1 posts · Apr 2010
If you (or any visitor running a search) are looking for specifics - I worked it out despite not knowing much PHP. There are two steps, and remember that until they add these features you'll have to re-do this every time the theme updates. I added links for Twitter, Facebook, myspace, and LinkedIn to my site in this manner, so those are the codes I'm including. You'll also need appropriate images for the link icons, but most of these came preloaded with the theme anyway.

First, edit your CSS. Add the following CSS code (I put it in css.php but you should be able to do it using CSS includes as well.)

Code:
/*-------------------- TWITTER FEED ICON --------------------*/

a.twitter-icon {
	height: 22px;
	line-height: 22px;
	margin: 0 5px 0 0;
	padding-left: 20px;
	display: block;
	text-decoration: none;
	float: right;
	white-space: nowrap;
	}

a.twitter-icon:link,
a.twitter-icon:active,
a.twitter-icon:visited {
	background: transparent url(<?php echo $bfa_ata['template_directory']; ?>/images/twitter-gray.png) no-repeat scroll center left;
}

a.twitter-icon:hover {
	background: transparent url(<?php echo $bfa_ata['template_directory']; ?>/images/twitter.png) no-repeat scroll center left;
}

/*-------------------- FACEBOOK FEED ICON --------------------*/

a.facebook-icon {
	height: 22px;
	line-height: 22px;
	margin: 0 5px 0 0;
	padding-left: 20px;
	display: block;
	text-decoration: none;
	float: right;
	white-space: nowrap;
	}

a.facebook-icon:link,
a.facebook-icon:active,
a.facebook-icon:visited {
	background: transparent url(<?php echo $bfa_ata['template_directory']; ?>/images/facebook-gray.png) no-repeat scroll center left;
}

a.facebook-icon:hover {
	background: transparent url(<?php echo $bfa_ata['template_directory']; ?>/images/facebook.png) no-repeat scroll center left;
}

/*-------------------- LINKEDIN FEED ICON --------------------*/

a.linkedin-icon {
	height: 22px;
	line-height: 22px;
	margin: 0 5px 0 0;
	padding-left: 20px;
	display: block;
	text-decoration: none;
	float: right;
	white-space: nowrap;
	}

a.linkedin-icon:link,
a.linkedin-icon:active,
a.linkedin-icon:visited {
	background: transparent url(<?php echo $bfa_ata['template_directory']; ?>/images/linkedin-gray.png) no-repeat scroll center left;
}

a.linkedin-icon:hover {
	background: transparent url(<?php echo $bfa_ata['template_directory']; ?>/images/linkedin.png) no-repeat scroll center left;
}

/*-------------------- MYSPACE FEED ICON --------------------*/

a.myspace-icon {
	height: 22px;
	line-height: 22px;
	margin: 0 5px 0 0;
	padding-left: 20px;
	display: block;
	text-decoration: none;
	float: right;
	white-space: nowrap;
	}

a.myspace-icon:link,
a.myspace-icon:active,
a.myspace-icon:visited {
	background: transparent url(<?php echo $bfa_ata['template_directory']; ?>/images/myspace-gray.png) no-repeat scroll center left;
}

a.myspace-icon:hover {
	background: transparent url(<?php echo $bfa_ata['template_directory']; ?>/images/myspace.png) no-repeat scroll center left;
}
Next, you need to edit the bfa_header_config.php file to add the links in question. Add the following code, but see the caveat below:

Code:
		//LINKEDIN Feed link
		if ( $bfa_ata['show_posts_icon'] == "Yes" ) { 
			
			$logo_area .= '<a class="linkedin-icon" '; 
			$logo_area .= 'href="http://www.linkedin.com/in/yourpage" title="sometext">' . '</a>';
			
		}

		//MYSPACE Feed link
		if ( $bfa_ata['show_posts_icon'] == "Yes" ) { 
			
			$logo_area .= '<a class="myspace-icon" '; 
			$logo_area .= 'href="http://www.myspace.com/yourpage" title="sometext">' . '</a>';
			
		}

		//FACEBOOK Feed link
		if ( $bfa_ata['show_posts_icon'] == "Yes" ) { 
			
			$logo_area .= '<a class="facebook-icon" '; 
			$logo_area .= 'href="http://www.facebook.com/yourpage" title="sometext">' . '</a>';
			
		}

		//TWITTER Feed link
		if ( $bfa_ata['show_posts_icon'] == "Yes" ) { 
			
			$logo_area .= '<a class="twitter-icon" '; 
			$logo_area .= 'href="http://twitter.com/yourpage" title="sometext">' . '</a>';
			
		}
Caveat: Because I didn't want any text, just the icons, the PHP code above doesn't include link text.

You can see how this was implemented on my site here: http://hexink.com

I'm an artist, so coming up with the most elegant solution may well be beyond me. This seems to work just fine, though, for the time being.
  #4  
Old May 26, 2010, 10:10 PM
ColoradoGirl
 
1 posts · May 2010
Hello!
I am having trouble executing this code example. None of the additional buttons are showing up. My Atahualpa theme currently has Posts, Comment, and Email feeds. I'd like to include Facebook and Twitter, but I'm unsure where I'm messing up. The code in my bfa_header_config.php" file is attached. Can someone help me format this section? Thanks so much!
Attached Files
File Type: txt bfa_header_config_part.txt (2.6 KB, 1226 views)
  #5  
Old May 27, 2010, 04:00 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
ColoradoGirl
it looks like you did this in Word is that correct? you never want to edit code with Word, you want a text editor. Word has this (nasty) habit of putting in all sorts of formatting code around the text which does not help. So use a text editor and always save teh file as text (on the Mac 'TextWrangler' is a great free editor)

so start with that and try again - because of the formatting issue, I can't ever begin to figure out you may have done.

What is your version of Atahualpa and wp?
What is the url?
__________________
"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; Jun 1, 2010 at 07:39 AM.
  #6  
Old May 31, 2010, 02:49 PM
imwiththebandlq
 
6 posts · May 2010
Thanks so much for the code hexink! I've also been trying to figure this out. I've added the codes above to my css.php and bfa_header_config.php, but my links are also not showing up in the header. Is there something else I need to add?

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
Aligining Search box and RSS icons with logo shirlockc Header configuration & styling 1 Jan 30, 2010 11:26 AM
Atahualpa 3.4.4 - resize the rss-box richardalois Header configuration & styling 1 Dec 18, 2009 09:16 PM
Standard RSS Feed Subscription Box does not come up. FeedSmith doesn't help TheJobSwami RSS, Feeds & Subscribing 1 Nov 15, 2009 12:12 PM
Line up rss feed and search box gasserol Header configuration & styling 1 Nov 3, 2009 07:39 AM
Widgetize the RSS box area SFGolfer Sidebars & Widgets 1 Oct 16, 2009 11:54 AM


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


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