So in this tutorial we will show you that how you can create a whastapp sharing button on your webpages.

Just add the source code in your webpage to create a whatsapp share link.

<pre><code><a href="whatsapp://send?text= Welcome to Social Codia" data-action="share/whatsapp/share">Share via Whatsapp</a> </code></pre>

And that’s it. No Javascript needed, nothing else needed. Of course you can style it as you want and include a nice Whatsapp icon.X

Now if you want to hide the share link on Desktop Sites and want to show only in Mobile devices, you can add @media screen in css.

<style type="text/css">
	@media screen and (min-width: 600px) {
		 #android-share {
		 visibility: hidden;
		 clear: both;
		 float: left;
		 margin: 10px auto 5px 20px;
		 width: 28%;
		 display: none;
		 }
	}
</style>
<div id="android-share">
	<a href="whatsapp://send?text= Welcome to Social Codia" data-action="share/whatsapp/share">Share in Whatsapp</a>
</div>

This CSS code will hide the share link in bigger screen.

Do you like socialcodia's articles? Follow on social!
Comments to: How to add WhatsApp share button on your Website – Social Codia

Your email address will not be published. Required fields are marked *

Attach images - Only PNG, JPG, JPEG and GIF are supported.

Good Reads

Worlwide

Trending

Login


Fatal error: Uncaught Error: Class 'Elementor\Scheme_Typography' not found in /home/socia106/domains/socialcodia.com/public_html/wp-content/themes/typer/inc/Elementor/Widgets/Onboarding.php:250 Stack trace: #0 /home/socia106/domains/socialcodia.com/public_html/wp-content/plugins/elementor/includes/base/controls-stack.php(2327): Seventhqueen\Typer\Onboarding->_register_controls() #1 /home/socia106/domains/socialcodia.com/public_html/wp-content/plugins/elementor/includes/base/controls-stack.php(496): Elementor\Controls_Stack->init_controls() #2 /home/socia106/domains/socialcodia.com/public_html/wp-content/plugins/elementor/includes/base/widget-base.php(177): Elementor\Controls_Stack->get_stack() #3 /home/socia106/domains/socialcodia.com/public_html/wp-content/plugins/elementor/includes/base/controls-stack.php(300): Elementor\Widget_Base->get_stack() #4 /home/socia106/domains/socialcodia.com/public_html/wp-content/plugins/elementor/includes/base/controls-stack.php(2416): Elementor\Controls_Stack->get_controls() #5 /home/soci in /home/socia106/domains/socialcodia.com/public_html/wp-content/themes/typer/inc/Elementor/Widgets/Onboarding.php on line 250