Topic: Social Media Buttons?
As standard int he them there is provision for a twitter and rss button, is it possible to add a youtube and flickr one too?
Fingers crossed phase one of my site will be done in the next week ![]()
Arras WordPress Theme Community Forums
Community support for Arras and other WordPress projects
You are not logged in. Please login or register.
Arras 1.5.2-RC2 Now Available: Download Here
Forum Rules: Please ensure that you have clearly read and understood the forum rules before posting.
User Confirmations / Password Reminders: Please check your spam folder before emailing for help if you have not received the confirmation or password reset emails.
As standard int he them there is provision for a twitter and rss button, is it possible to add a youtube and flickr one too?
Fingers crossed phase one of my site will be done in the next week ![]()
xtreme,
I too was looking at doing this. Here is what I found:
In the header.php file look for this code:
<ul class="quick-nav clearfix">
<?php if ($feed == '') : ?>
<li><a id="rss" title="<?php printf( __( '%s RSS Feed', 'arras' ), esc_html( get_bloginfo('name'), 1 ) ) ?>" href="<?php bloginfo('rss2_url'); ?>"><?php _e('RSS Feed', 'arras') ?></a></li>
<?php else : ?>
<li><a id="rss" title="<?php printf( __( '%s RSS Feed', 'arras' ), esc_html( get_bloginfo('name'), 1 ) ) ?>" href="<?php echo $feed; ?>"><?php _e('RSS Feed', 'arras') ?></a></li>
<?php endif; ?>
<?php $twitter_username = arras_get_option('twitter_username'); ?>
<?php if ($twitter_username != '') : ?>
<li><a id="twitter" title="<?php printf( __( '%s Twitter', 'arras' ), esc_html( get_bloginfo('name'), 1 ) ) ?>" href="http://www.twitter.com/<?php echo $twitter_username ?>/"><?php _e('Twitter', 'arras') ?></a></li>
<?php endif ?>
<?php $facebook_profile = arras_get_option('facebook_profile'); ?>
<?php if ($facebook_profile != '') : ?>
<li><a id="facebook" title="<?php printf( __( '%s Facebook', 'arras' ), esc_html( get_bloginfo('name'), 1 ) ) ?>" href="<?php echo $facebook_profile ?>"><?php _e('Facebook', 'arras') ?></a></li>
<?php endif ?>
</ul>Just under the first
<ul>at the top add in your code for your graphic and your link to the service and surround it with the
<li></li>codes.
For Example:
<ul class="quick-nav clearfix">
<li><a href="http://yourtube.com/mymarketingmentor" target="_blank">YouTube</a></li> <== NEW LINE OF CODE
<?php if ($feed == '') : ?>
<li><a id="rss" title="<?php printf( __( '%s RSS Feed', 'arras' ), esc_html( get_bloginfo('name'), 1 ) ) ?>" href="<?php bloginfo('rss2_url'); ?>"><?php _e('RSS Feed', 'arras') ?></a></li>
<?php else : ?>
<li><a id="rss" title="<?php printf( __( '%s RSS Feed', 'arras' ), esc_html( get_bloginfo('name'), 1 ) ) ?>" href="<?php echo $feed; ?>"><?php _e('RSS Feed', 'arras') ?></a></li>
<?php endif; ?>
<?php $twitter_username = arras_get_option('twitter_username'); ?>
<?php if ($twitter_username != '') : ?>
<li><a id="twitter" title="<?php printf( __( '%s Twitter', 'arras' ), esc_html( get_bloginfo('name'), 1 ) ) ?>" href="http://www.twitter.com/<?php echo $twitter_username ?>/"><?php _e('Twitter', 'arras') ?></a></li>
<?php endif ?>
<?php $facebook_profile = arras_get_option('facebook_profile'); ?>
<?php if ($facebook_profile != '') : ?>
<li><a id="facebook" title="<?php printf( __( '%s Facebook', 'arras' ), esc_html( get_bloginfo('name'), 1 ) ) ?>" href="<?php echo $facebook_profile ?>"><?php _e('Facebook', 'arras') ?></a></li>
<?php endif ?>
</ul>You would need to create the code and include it for a graphic (The example is only for text. )
When I tried adding this bit of code it showed up on the header bar next to the other buttons.
Good luck,
Cindy
Last edited by cindy (2010-09-10 14:45:09)
Coincidently, I've been unable to find that in my Header.php... I don't think it helps that the actual file is a lot more cluttered.
Actually, you'll find reference to the social media icons under function arras_social_nav() in template.php
In addition to adding the call, you need to edit your respective stylesheet.
If you're using default.css, this is what you need to look for:
.quick-nav li { padding: 5px 0 0 8px; }
.quick-nav a:link, .quick-nav a:visited { display: block; text-indent: -9000px; width: 16px; height: 16px; float: left; clear: left; opacity: 0.6; }
.quick-nav a:hover { opacity: 1; }
.quick-nav #rss { background: url(../../images/rss.png) no-repeat; }
.quick-nav #twitter { background: url(../../images/twitter.png) no-repeat; }
.quick-nav #facebook { background: url(../../images/facebook.png) no-repeat; }
Last edited by TheCriticalPath (2010-09-11 23:23:18)
Coincidently, I've been unable to find that in my Header.php... I don't think it helps that the actual file is a lot more cluttered.
That's because it isn't in Arras 1.5 anymore. Arras uses an action hook for that.
thank you all for this thread, ive been searching forever trying to figure out how to add more social media icons. for anyone's reference, here's what i did:
find in template.php (line 360 approx):
<?php $facebook_profile = arras_get_option('facebook_profile'); ?>
<?php if ($facebook_profile != '') : ?>
<li><a id="facebook" title="<?php printf( __( '%s Facebook', 'arras' ), esc_html( get_bloginfo('name'), 1 ) ) ?>" href="<?php echo $facebook_profile ?>" target="_blank"><?php _e('Facebook', 'arras') ?></a></li>
<?php endif ?>below that paste:
<li><a id="youtube" title="<?php printf( __( '%s YouTube Channel', 'arras' ), esc_html( get_bloginfo('name'), 1 ) ) ?>" href="http://youtube.com/user/punknomadtv"><?php _e('YouTube', 'arras') ?></a></li>change as needed for whatever social service you're adding of course. then:
open style.css (preferably in your child theme) and add to the bottom:
/* Social media icons */
.quick-nav #youtube { background: url(../arras/images/youtube.png) no-repeat; }obviously your class id should match that in the code in template.php, and the path to the image might be different if you're not using a child theme. upload the images to the correct folder and you're done. yay!
Last edited by omensandportents (2012-01-25 22:36:05)
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 9 official extensions. Copyright © 2003–2009 PunBB.
Generated in 0.034 seconds, 12 queries executed