How to add specific WhatsApp Widgets to specific WordPress Pages


Reading Time: < 1 minute

If you need to add specific WhatsApp Widgets to specific WordPress pages, you can use this code to define where you want the widget to appear.

This control requires some coding, but it is very easy to setup:

<?php if (is_page( array(‘whatsapp-academy‘, ‘whatsapp-dictionary‘))) : ?>
<script defer data-key=”0e9af296-3873-4102-8eb8-ef04e30e35f8″ src=”https://widget.tochat.be/bundle.js“></script>
<?php endif ?>

whatsapp-academy and whatsapp-dictionary are the slugs of the pages where you want the script to be load.

This is the script you can generate using our service – https://services.tochat.be/ :

<script defer data-key=”0e9af296-3873-4102-8eb8-ef04e30e35f8″ src=”https://widget.tochat.be/bundle.js“></script>

and that is all.

You can paste the code in your template and save it.

You can add unlimited agents to your widget and you can add a random list to your agents so they are presented in random order.


By César Martín (ToChat.be)

We develop WhatsApp solutions, WhatsApp API and WhatsApp Widgets. Please contact us for more information. We are here to help you.