Share Posts on Whatsapp – how to customize this plugin?

This is a quick fix on WordPress plugin called ‘Share Posts on Whatsapp’ by Aftab Husain. I have been using this plugin for quite sometime and it did not give me much problem. But it’s lack the facility to limit the sharing button to only posts, or to only pages.

I took a look at the coding and actually it can be further customized, such as limiting the sharing button to only blog posts (not pages). In the plugin folder, notice that there is a file called ‘share-post-on-whatsapp.php’. Edit the file and find this line:

$html = $html . "<div class='clear '></div></div>";

Add this new line under it:


Save the file and you will notice Whatsapp button not displayed on pages anymore.

Prev PostMalaysia unlimited mobile plan revisited
Next PostGolf scorecard - MGCC & Royal Pahang

Leave a reply