Mbrsolution

Web Developing / Computer Repairs Brisbane
  • Home
  • Contact Mbrsolution
  • Mbrsolution Blog
  • Search My Site
  • Web Tutorials
    • Joomla Tutorials
    • KompoZer Tutorials
    • WordPress Tutorials
      • WordPress Plugins Tutorials
        • All In One WP Security And Firewall Plugin
        • WordPress eStore Plugin Complete Selling Online Solution
        • WordPress Fast Secure Contact Form Plugin
        • WordPress Photonic Gallery Plugin
        • WordPress Simple PayPal Shopping Cart Plugin
        • WordPress WooCommerce eCommerce Plugin
        • WP eMember Membership Plugin
        • CataBlog Tutorials
      • WordPress Theme Tutorials
        • Template Toaster Software WordPress
        • Suffusion Theme Tutorials
  • WordPress Web Design
Home » Google » Social Media Share Buttons Google Twitter Facebook

Social Media Share Buttons Google Twitter Facebook

 Google, Social Networks, WordPress
Jun 182014
 

Social Media Share Buttons Google Twitter Facebook post will show you how to display the social media Google Plus, Facebook and Twitter in pages, post and more.

Last Updated: December 23, 2016

Latest News: I have updated the information below.

Note: This plugin has been tested with WordPress 4.6.1 and it works well.

The plugin that I will be using is from Tips And Tricks HQ. They have released a very simple and effective Social Sharing Plugin that uses very little resources.

The code and information is obtained from codex.wordpress.org.

What You Need:

  • Fat Free WordPress Social Share Buttons Plugin
  • Page from wordpress.org Conditional_Tags#The_Front_Page (Optional to read)

Social Media Share Buttons Google Twitter Facebook Steps

The plugin will display Google +, Twitter and Facebook on your blog post. What if you want to add and modify the code so that it displays on pages, blog post, front page or other places?

Step 1 ) Install the plugin as you normally install a plugin in WordPress. The plugin has no settings to configure. So it is a simple installation and activation process.

Step 2 ) FTP into your server and locate your plugins directory. Find the following plugin folder gfts-share-buttons. Locate inside the following file gfts_share_buttons.php and download it locally via FTP.

social-media-sharing-buttons-google-twitter-facebook-file

Note: If you don’t want to FTP into your server for what ever reason. You can always edit the file from your website. Log in as admin and click on the following Plugins -> Editor. Locate and edit the plugin file. Make sure you save your settings.

Step 3 ) Open the file using a text editor or a php editor. Locate the following if(is_single()) and replace it with the following code. See image below.

Understanding The Code

What it all means:

The following if (is_single()) //Load these in the single post view only. This is a very simple explanation.

New code to add if (is_single() || is_front_page ()) in the two locations as shown below. This will display the social media buttons on a single post and also on the front page as well.

social-media-sharing-buttons-google-twitter-facebook-code

Important: Once you finish editing your file, save and upload the file to the same location on your server.

The code above is to prevent the social media buttons from appearing on all pages like your Contact Us page.

What if you want it to appear on certain pages?

A Single Post Page

is_page( ’17’ ) //When Page 17 is being displayed.
is_single( ‘Irish Stew’ ) //When the Post with Title “Irish Stew” is being displayed as a single Post.

From the above code you can see how easy it is to display the social media buttons on certain pages. Search for all the pages where you would like the social media buttons to appear and add them as you see in the example above.

If you wanted to display the buttons on more than one page then you would use the following code.

is_page( array( 17, 19, 1, 11 ) )

(Note: Remember that your pages ID number will be different )

Step 4 ) The following image displays the social buttons on a page or post.

social-media-sharing-buttons-google-twitter-facebook-display

If you need to find how to add different functions, click on the following URL Function Reference from wordpress.org.

That is how simple it is to modify the code in this great plugin. I will be updating this post from time to time. If you have any questions please let me know.

Enjoy.

Manuel Ballesta Ruiz is a web developer, Blogger and WordPress Enthusiast.
 Tagged with: Facebook, google adsense, social sharing, tutorial, twitter

 Leave a Reply Cancel reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

The following GDPR rules must be read and accepted:
This form collects your name, email and content so that we can keep track of the comments placed on the website. For more info check our privacy policy where you will get more info on where, how and why we store your data.

  Fast Secure Contact Form Two Columns Layout   Photonic Generic Options

Follow Me

Mbrsolution Facebook Mbrsolution RSS Feed Mbrsolution Twitter

Spanish Blog

Blog in Spanish


Blog Español

Recent Posts

  • WordPress HireBee Theme Troubleshooting
  • WP Clipper Theme Menu Setup
  • WP Clipper Theme Header Area
  • How To Install WordPress Clipper Theme
  • WordPress The SEO Framework Plugin

Recent Comments

  • Webmaster on WordPress Affiliates Manager Settings
  • Gopi Krishna on WordPress Affiliates Manager Settings
  • Webmaster on The Best GDPR And Cookie Plugins For WordPress
  • Alex on The Best GDPR And Cookie Plugins For WordPress
  • Webmaster on WordPress SEO Framework Sitemap Settings

MailChimp Signup Form

Your information will be used to send you Blog updates. You can change your mind at any time by clicking the unsubscribe link at the bottom of any email that you receive from me. You can find details about mbrsolution privacy practices here.
Affiliate Link Manager
WordPress Membership Plugin
WP Shopping Cart
WP Lightbox Ultimate
WordPress Membership Plugin

Pages

  • About Mbrsolution
  • IT and SEO Support Rates
  • Links
  • Mbrsolution Blog
  • PC Tips and Tricks
  • Portfolio
  • Recommendation Tools For Windows
  • Resume
  • Sitemap
  • Testimonials
  • Virtualizing Applications
  • Website Design Tools
  • WordPress Web Design
  • WordPress Website Seo Management
  • WordPress Plugins Tutorials
  • WordPress Theme Tutorials

Tutorials

  • Android Tutorials
  • Facebook Tutorials
  • Gimp Tutorials Latest Version
  • Google Tutorials
  • PayPal Tutorials
  • Selling And Buying eBay Tutorials
  • YouVersion Bible Tutorials
  • WordPress Plugins Tutorials
  • WordPress Theme Tutorials

Buy Me Coffee!

If you find my site helpful and wish to buy me a cup of coffee. Money is used to help pay for hosting as well as other site needs and maintenance. Click on the following image. Thank you and enjoy my site.
Please Donate To Help My Site
© 2009 - 2019 Mbrsolution All Rights Reserved Please read the following:
Terms And Conditions

Privacy Policy

Disclaimer

Copyright Notice.

Mbrsolution Site Monitor
Suffusion theme by Sayontan Sinha
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.AcceptRead more