There are many WordPress plugins out there that allow you to display various social media buttons on your posts making it very simple for your readers to share and submit your article to various social media websites.
While this is a great way to promote your blog posts, the buttons do not serve a purpose if you simply have an announcement to make on a post.
It would be great if we can turn the option on and off as needed, right?. Well by using WordPress’ custom fields and a little bit of PHP coding, we can display or not display these social media icons.
Let’s get to it
Step 1 – Download the SexyBookmarks plugin, upload it into your plugins folder and activate it.
Step 2 – Go into the plugin settings and modify the settings. You can reorder the icons by clicking and dragging. Check mark the ones you want to display.

In the Placement option, select Manually Insert.

Step 3 – Go into your Themes folder and find single.php. Open the file and locate The following code:
1 | <?php the_title(); ?> |
The above code displays the title of your blog post. If you want the social media icons to appear right above title, then copy the code below and place it before the title.
1 2 3 | <?php if(get_post_meta($post->ID, "socialmedia", true)){ if(function_exists('selfserv_sexy')) { selfserv_sexy(); } } ?> |
If you want the plugin to display at the bottom of your post, then paste the above code right after:
1 | <?php the_content(); ?> |
Step 4 – In the Admin panel, open up one of your posts or create a new one. Scroll down to the Custom Fields section, click Enter New, name it socialmedia and give it a value of 1 or yes or whatever value you prefer, it really doesn’t matter as long as you input a value in there. Click the Add Custom field button to save it. You should now see a custom field called social media with a value of 1 or whatever value you chose.

From now on whenever you want to display your social media icons, simply scroll down to the Custom Fields section, click on the name drop-down, select socialmedia and give it any value.

Related posts:
- Reverse The WordPress Comments From Newest To Oldest If you want to display your comment list from newest...
- How To Remove Categories From Your URL WordPress is my favorite blogging platform but it’s not perfect...
Great post, i think blog posts like this add so much value to the marketing community,i have learnt some valuable info from you. Keep it Up! Sincerely, The Social Media Trainer
Reply To This Comment
I am really grateful that I determined this particular article. This’s just the advice I had been looking for.
Reply To This Comment
Sexy Bookmarks is the best Bookmarks plugin for wordpress, I use it for all of my sites. Thanks for showing how to add the buttons manually. Till now I only used the automatic option
Reply To This Comment
here is momething happened here
Reply To This Comment
Brilliant. Excellent. Amazing.. Now adding up all buttons.
Reply To This Comment
Thanks! I’ve been looking for a way to turn these buttons off.
Reply To This Comment
1 Trackbacks/Pingbacks
Pages
Featured Template
Recent Comments
Connect With Me
Twitter
StumbleUpon
Facebook
FriendFeed
LinkedIn
RSS Feed
Check out my about.me profile!
Latest Testimonial
"As the project began, Jon led me through process, and the final product is better than I could have imagined!" [ ...read more... ]
© 2012 » JBWEBDEV « Houston Web Design & Development
My Favorite Links
Recent Project
www.modernsalondayspa.com
Ways to Contact Me
Follow me on Twitter - jonxblaze
Call me directly - 832.413.2642
Go to my contact form
Drop a comment on my blog
GTalk me at jonxblaze[at]gmail