2

Is it possible to make a theme with an option of configuring social icons with links through the custom header control panel?

I googled it and found nothing that could help me, any help on that topic will be very appreciated

UPDATE
What I'm trying to achieve is that in the theme control panel (preferably inside the header panel and without using an external plugin) the user will be able to set which social icons will appear and to configure them.

  • 1
    Could you give a bit more information on what exactly you want? If your sole question is if this is possible or not, the answer is "yes". You might want to check this out wordpress.org/extend/plugins/simple-social-icons (or any similair plugin) and just add a widget area in your header. The Simple Social Icons plugin is an easy to use, customizable way to display icons that link visitors to your various social profiles. Please explain a bit more on what your trying to achieve / realize. If your want to try the above solution (with the widgets) let me know and I will explain further – Aleks Jul 3 '12 at 8:28
  • @Aleks thanx, I've updated the question – ilyo Jul 3 '12 at 9:07
3

I did something similar on my site a while back. I'm sure you can tweak it to fit your needs.

Under each article I have an author box with social media icons that link to their accounts.

In content-single.php

<?php if ( get_the_author_meta('twitter') ) : ?>
    <a href="http://www.twitter.com/<?php the_author_meta('twitter'); ?>" title="Twitter"><img src="<?php bloginfo( 'url' ) ?>/images/twitter.png" /></a>
<?php endif; ?>
<?php if ( get_the_author_meta('facebook') ) : ?>
    <a href="http://www.facebook.com/<?php the_author_meta('facebook'); ?>" title="Facebook"><img src="<?php bloginfo( 'url' ) ?>/images/facebook.png" /></a>
<?php endif; ?>
<?php if ( get_the_author_meta('gplus') ) : ?>
    <a href="http://plus.google.com/<?php the_author_meta('gplus'); ?>" title="Google Plus"><img src="<?php bloginfo( 'url' ) ?>/images/google.png" /></a>
<?php endif; ?>
<?php if ( get_the_author_meta('linkedin') ) : ?>
    <a href="http://www.linkedin.com/in/<?php the_author_meta('linkedin'); ?>" title="Linkedin"><img src="<?php bloginfo( 'url' ) ?>/images/linkedin.png" /></a>
<?php endif; ?>

In functions.php

function social_media_icons( $contactmethods ) {
    // Add social media
    $contactmethods['twitter'] = 'Twitter';
    $contactmethods['facebook'] = 'Facebook';
    $contactmethods['gplus'] = 'Google Plus';
    $contactmethods['linkedin'] = 'Linkedin';

    return $contactmethods;
}
add_filter('user_contactmethods','social_media_icons',10,1);

This adds extra fields in your user profile settings (wp-admin/profile.php or wp-admin/user-edit.php?user_id=1). When you fill them out the social media icons appear. If the fields are left blank, nothing gets displayed.

Hope this helps!

0

Mananing social buttons links from theme option is a good choice but you can add social share buttons using shortcode that can be attached in wordpress query loop. I found a shortcode that can handle social share buttons that can be add any where as you want. please follow this link that is really helpful please check this link http://nrtechwebsolution.com/custom-social-share-for-wordpress-post/

  • Please post answer here in addition to linking externally. – bravokeyl Oct 20 '16 at 6:13
-1

Without installing any plugin we can add the social bookmarks. I found following article for this. adding social share buttons without wordpress plugin

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Gabriel May 5 '16 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.