So hello guys, let´s do it!
I´ve an other domain to do my tests, and I´ll show how to do in the hard way ok?
I´ve tested and it work so fine, but you will need to make the images for the social media you want ok?
First see that experience is under the:
Wordpress version 3.2
Arras theme Version 1.5.1
Let´s work with 4 files:
default.css located in ./css/styles/default.css
options.php located in ./admin/options.php
template.php located in ./library/template.php
arras-general.php located in ./admin/templates/arras-general.php
First in the default.css locate the line:
and add after
.quick-nav #youtube { background: url(../../images/youtube.png) no-repeat; }
.quick-nav #linkedin { background: url(../../images/linkedin.png) no-repeat; }
.quick-nav #gplus { background: url(../../images/googleplus.png) no-repeat; }
So now you have the CSS style !
Then go to options.php located in ./admin/options.php find the line:
add after $this->facebook_profile = (string)$_POST['arras-facebook']; the lines:
$this->youtube_profile = (string)$_POST['arras-youtube'];
$this->linkedin_profile = (string)$_POST['arras-linkedin'];
$this->gplus_profile = (string)$_POST['arras-gplus'];
Well, now you have the necessary calls to be saved in the file! But how I put the links? Easy, save the options.php and run away to template.php located in ./library/template.php and locate the
function arras_social_nav()
After the
<?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 ?>
Insert the code
<?php $youtube_profile = arras_get_option('youtube_profile'); ?>
<?php if ($youtube_profile != '') : ?>
<li><a id="youtube" title="<?php printf( __( '%s Youtube', 'arras' ), esc_html( get_bloginfo('name'), 1 ) ) ?>" href="<?php echo $youtube_profile ?>" target="_blank"><?php _e('Youtube', 'arras') ?></a></li>
<?php endif ?>
<?php $linkedin_profile = arras_get_option('linkedin_profile'); ?>
<?php if ($linkedin_profile != '') : ?>
<li><a id="linkedin" title="<?php printf( __( '%s LinkedIn', 'arras' ), esc_html( get_bloginfo('name'), 1 ) ) ?>" href="<?php echo $linkedin_profile ?>" target="_blank"><?php _e('LinkedIn', 'arras') ?></a></li>
<?php endif ?>
<?php $gplus_profile = arras_get_option('gplus_profile'); ?>
<?php if ($gplus_profile != '') : ?>
<li><a id="gplus" title="<?php printf( __( '%s Google+', 'arras' ), esc_html( get_bloginfo('name'), 1 ) ) ?>" href="<?php echo $gplus_profile ?>" target="_blank"><?php _e('Google+', 'arras') ?></a></li>
<?php endif ?>
Well, well, well! if you get here is easy to finish what we started, open the last file arras-general.php located in ./admin/templates/arras-general.php because, it will be lovely to show the questions in the options page right?
locate the code:
<tr valign="top">
<th scope="row"><label for="arras-facebook"><?php _e('Facebook Profile (URL)', 'arras') ?></label></th>
<td>
<?php echo arras_form_input(array('name' => 'arras-facebook', 'id' => 'arras-facebook', 'class' => 'code', 'size' => '65', 'value' => arras_get_option('facebook_profile') )) ?><br />
<?php _e('Link to your Facebook profile.', 'arras') ?>
</td>
</tr>
After you simply add this lines:
<tr valign="top">
<th scope="row"><label for="arras-youtube"><?php _e('YouTube Channel (URL)', 'arras') ?></label></th>
<td>
<?php echo arras_form_input(array('name' => 'arras-youtube', 'id' => 'arras-youtube', 'class' => 'code', 'size' => '65', 'value' => arras_get_option('youtube_profile') )) ?><br />
<?php _e('Link to your Youtube profile.', 'arras') ?>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="arras-linkedin"><?php _e('Linkedin Profile (URL)', 'arras') ?></label></th>
<td>
<?php echo arras_form_input(array('name' => 'arras-linkedin', 'id' => 'arras-linkedin', 'class' => 'code', 'size' => '65', 'value' => arras_get_option('linkedin_profile') )) ?><br />
<?php _e('Link to your Linkedin profile.', 'arras') ?>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="arras-gplus"><?php _e('Google+ Profile (URL)', 'arras') ?></label></th>
<td>
<?php echo arras_form_input(array('name' => 'arras-gplus', 'id' => 'arras-gplus', 'class' => 'code', 'size' => '65', 'value' => arras_get_option('gplus_profile') )) ?><br />
<?php _e('Link to your Google+ profile.', 'arras') ?>
</td>
</tr>
Well done! see the results here!
Wordpress version 3.2
Arras theme Version 1.5.1
Post's attachmentsprofiles.PNG 27.1 kb, 5 downloads since 2011-07-07
You don't have the permssions to download the attachments of this post.
Ваша программа сосет - Whiplash