Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Add WhatsApp Share Button in WordPress

Messaging apps like WhatsApp are becoming a new way to share things with friends. Recently one of our users asked us how they can add a WhatsApp share button in their posts. In this article, we will show you how to add WhatsApp share button in WordPress.


Video Tutorial

Subscribe to WPBeginner

If you don’t like the video or need more instructions, then continue reading.

First thing you need to do is install and activate the WhatsApp Share Button plugin. Upon activation, you need to visit Settings » WhatsApp Share Button to configure the plugin.

Setting up WhatsApp Share Button plugin for WordPress

Automatically Show WhatsApp Share Button in WordPress

The plugin allows you to add WhatsApp share button both manually and automatically.

If you want to automatically display the button, then you need to check the options where you want it to be displayed.

Note: the plugin uses CSS code to detect a user’s screen size and will only show the WhatsApp button to users whose screen size is less than 1024px. If you are testing the plugin on your laptop, then you need to resize your browser screen until you see the button.

You can choose to show it on your posts, pages, and homepage. You can also choose the location of the button to be before or after the post content.

The last option on the settings page adds a utm parameter to the shared link. This is particularly useful for tracking links in Google Analytics.

Once you are satisfied with the options, click on the save button to store your settings.

Manually Add WhatsApp Share Button Using Shortcode

WhatsApp Share Button plugin comes with a shortcode, that you can add anywhere on your WordPress site to display the WhatsApp Share button.

Simply add [whatsapp] to your posts and pages where you want to display the button.

You can also use the shortcode inside a Text widget. By default, WordPress does not allow execution of shortcodes inside text widgets however you can enable this by adding a little code snippet into your theme’s functions.php file or a site-specific plugin.

add_filter('widget_text', 'do_shortcode');

Using The Shortcode To Share Any URL in WhatsApp

By default, the shortcode [whatsapp] automatically uses the URL of the currently displayed post or page. However, you can override this and add any URL that you want your users to share by using a shortcode like this:

[whatsapp title=”WPBeginner” url=””]

That’s all. We hope this article helped you learn how to add a WhatsApp share button in WordPress. You may also want to see our list of 21 best social media monitoring tools for WordPress users.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

9 CommentsLeave a Reply

  1. Compared to other social sharing options, I believe WhatsApp, Facebook and Twitter form the bulk of social sharing in India. Thanks for sharing this article.

  2. Can you add the whats app sharing button to pictures? Some of my blog posts are heavy with pictures and I wouldn’t want the url of the post shared, instead I would want the specific picture inside the post shared. Is that possible?

  3. What I noticed is that the more plugin you add to your site the less you understand what happened once your theme crashes.

  4. Installed ! Thank you.

    I reduced the size of my screen and i saw it but havent seen it on mobile though

  5. Note: This app has not been tested with the latest versions of WordPress above v 4.0.7. My site uses WordPress 4.2.4. How can I be certain it is OK to use?

    • The only way to be 100% certain is to test it yourself, or consult users that used it with your WP version. According to the developers note, it should work.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.