If you are like me, you frequently need to be able to easily add social media follow buttons directly to your WordPress theme. You could, of course, hard-code them, but you are still going to have to find the images and add all that markup to get it looking good.
There is an easy way! With the Social Media Feather plugin, we can use a simple bit of code in our template files to add the follow buttons wherever we want. And best of all, you can change your links and buttons from the WordPress backend; no need to edit the code every time!
Step 1: Install the plugin.
Not much to this, if you don’t know how to install a plugin, Google it. The settings for it are pretty self-explanatory as well, I think you can figure that out on your own.
Step 2: Insert the following code into your template file, where you would like the follow buttons to show up.
1 |
<?php echo synved_social_follow_markup();?> |
That’s… Really all there is to it! Alternatively, you can add this shortcode to posts, pages, widgets, or wherever, directly into the WordPress backend to display the buttons.
1 |
[feather_follow] |
But what about the shout-out to the plugin creators that seems to always accompany the buttons? It says “By:” and has a link with a feather icon. Ideally you would give credit to the plugin creators for doing something so nice for you by providing you a free plugin. But let’s say that you absolutely cannot have that credit on your site. Simply add the following to your theme’s style.css:
1 2 3 |
body a.synved-social-credit { display: none; } |
This will simply hide it. No need to worry about changing the plugin files or anything like that. Now you’ve got your social media buttons displayed, you can change them from the backend, and everything is all good to go. Enjoy!