How to fix Whatsapp Number and clicking to take to Whatsapp Chat on Header and Footer

First of all Whatsapp icon is only appears on mobile devices if you want to show it on all devices like PC, Laptop, Tablets, and Mobiles then simply go to the Dashboard >> Porto >> Theme Options >> Skin >> Custom CSS and then paste this code .share-whatsapp{display:block !important;} in Custom CSS section as showing below:

Now to fix the Whatsapp icon issue on header, when user click on Whatsapp icon it will let user to chat on Whatsapp. Simply go to your site cPanel and open the layout.php file under wp-content/themes/porto/inc/functions now when the file opens, scroll down to the page at line number 2141 there you see Anchor tag, simply copy this code

<a <?php echo porto_filter_output( $nofollow ); ?> class=”share-whatsapp” style=”display:none” href=”https://wa.me/+923413160974/?text=<?php echo esc_attr( $porto_settings[‘header-social-whatsapp’] ) ?>” data-action=”share/whatsapp/share” title=”<?phpesc_attr_e( ‘WhatsApp’, ‘porto’ ); ?>”><?phpesc_html_e( ‘WhatsApp’, ‘porto’ ); ?></a>

and replace it, then change the number in this code like the image below.

And check back your site after clear the browser cache.

Now for the Footer do the same thing as we do for header but for footer the file is different, you can find the footer file in the wp-content/plugins/porto-functionality/widgets then open follow_us.php and replace the code of line number 184 with this code

<a href=”https://wa.me/+923164354407/?text=<?php echo esc_attr( $whatsapp ) ?>” <?php echo $nofollow_escaped; ?> target=”_blank” <?php echo $tooltip_escaped; ?>title=”<?phpesc_attr_e( ‘WhatsApp’, ‘porto-functionality’ ); ?>” class=”share-whatsapp” style=”display:none”><?phpesc_html_e( ‘WhatsApp’, ‘porto-functionality’ ); ?></a>

and change your phone number in this code like in the below image.

And check back your site after clear the browser cache.

Hope this helps 🙂
Stay Safe & Healthy…

Regard’s P-Themes.