Add Floating WhatsApp Button in your WordPress Website

Add Floating WhatsApp Button in your WordPress Website

Open functions.php from your WordPress Child Theme and add the code below: add_action('wp_footer', 'add_whatsapp_icon'); function add_whatsapp_icon() { echo'<a style="display:block;position:fixed;left:15px;bottom:10px;z-index:1000;" href="https://wa.me/918888888888?text=Hi"><img src="https://dwij.net/resources/whatsapp.svg" style="width:50px;height:50px;"></a>'; } Make sure to update Phone Number. You may also need to update whatsapp.svg url to support Cross-origin Resource Sharing (CORS). Download SVG file from https://dwij.net/resources/whatsapp.svg.

April 2, 2018 · 1 min · Ganesh Bhosale
Quick Setup for WordPress Child Themes

Quick Setup for WordPress Child Themes

Create Folder abcdefg-child Create CSS File style.css /* Theme Name: ABCDEFG Child Theme URL: http://themes.webdevia.com/osterisk-voip-cloud-services-wordpress-theme Description: ABCDEFG Theme Child Author: Dwij IT Solutions Author URL: https://dwijitsolutions.com Template: abcdefg Version: 1.0.0 Text Domain: abcdefg-child */ Create Functions.php Files <?php add_action( 'wp_enqueue_scripts', 'enqueue_child_styles', 100); function enqueue_child_styles() { wp_enqueue_style( 'child-style', get_stylesheet_directory_uri().'/style.css'); } ?>