- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
How to add WhatsApp share button in WordPress
April 16, 2018
Social media is an extremely valuable tool for promoting your website and keep attention of visitors.
Social Share links and buttons option is a great opportunity to your website visitors easily share your posts, articles, news etc with their social media connections and networks.
That’s why, it is no wonder why it is necessary to add social buttons to the website, and today we will learn how to deal with that.
We will add the WhatsApp share button, as it is widely known that it is a cross-platform app, and one of the world’s most prominent social networks.
So, lets start to do a few easy steps and enjoy the result.
First of all, connect to your FTP or Cpanel, and navigate to the wp-content/yourtheme/inc directory.
There, open the template-meta.php file, and locate the code for Social Share buttons that looks like the following one:
Let’s add the code for WhatsApp below the last social button, in our case it is Pinterest.
Just copy and paste the code for one of the links that are added in file, and replace icon and name fields with the name of a new social sharing button.
In order to locate a needed social URL, you can use the following link.
the code will look like the following one:
'whatsapp' => array( 'icon' => 'fa fa-whatsapp', 'name' => esc_html__( 'Whatsapp', 'arnatera' ), 'share_url' => 'http://api.whatsapp.com/send?phone=15551234567&text=%3$s', ),
Instead of 15551234567, use your phone number in international format that must have an active account on WhatsApp.
Save the changes in file and check the website.
My congratulations! Now, the visitors can share your amazing posts on their WhatsApp messengers.
We hope this step-by-step guidance was useful for you. Feel free to check our blog to learn more tweaks on how to manage your WordPress website as a guru of the web design!
You may be looking for more website building options, so view the collection of WordPress Themes.