WhatsApp button for your website: WordPress, Shopify or HTML
How to add a WhatsApp button to your website with plain HTML, in WordPress or Shopify, or with the ManyContacts widget, and what happens after the click.
A WhatsApp button for your website is not a magic plugin. It is a visible link, usually fixed in a corner, that opens a chat with your number. If the link is wrong, so is the button. Build the URL first with the guide to create the link.
The minimal HTML
Replace the number with yours, with country code and no + sign. The link is this, in one piece:
<a href="https://wa.me/34600111222?text=Hi%2C%20I%27m%20writing%20from%20the%20website" target="_blank" rel="noopener">Message us on WhatsApp</a>
target="_blank" opens the chat without closing the product page. The button text on the page has to say what will happen. "WhatsApp" alone works. "Contact" does not, because nobody knows it is a chat.
To make it float at the bottom right, the link gets a class and a few lines of CSS (position: fixed; bottom: 16px; right: 16px). Do not cover it with the cookie banner or the back-to-top button. On mobile, a corner occupied by two bubbles is a finger tapping the wrong one.
The message (?text=) should say where it comes from: "Hi, I'm writing from the product page". That way the team does not ask "where did you find us?". If you have several landing pages, one text per page.
WordPress
Three routes, from simplest to most fragile:
- An HTML block in the footer template, or in a reusable block, with the link above. It does not depend on a plugin and does not break when the plugin stops being updated.
- The customiser or the theme footer, if your theme has an HTML field in the footer. Paste the link or the widget script there.
- A WhatsApp button plugin, only if it is maintained by someone you know and does not ask for odd permissions. Many do nothing more than the link. Check what else they inject.
Do not put the button on one page and forget the blog, the product page and the checkout. People hesitate on the product page. The global footer covers those templates in one go. Check the theme does not hide it on mobile: that is where it gets tapped most.
Shopify
In a Shopify store the usual place is the theme:
- theme.liquid, just before
</body>, if the button should appear across the whole store, including the cart. - A Custom liquid block in the theme editor, if you only want it on some templates.
The HTML is the same. You do not need a paid app for a link. An app makes sense if you also want opening hours, several agents in the bubble or a website chat that is not WhatsApp. For WhatsApp, the link is enough.
The number must be the shop's, the same as the order notifications. A button that opens the personal phone of whoever built the shop is the classic mistake. How orders work on the official channel is in WhatsApp and Shopify.
The ManyContacts widget
If you already use ManyContacts, the button can be the widget, without building the link by hand. You copy a script from the dashboard. The a value is your account's; do not copy it from another site.
It goes before </body>, in WordPress, Shopify or plain HTML. The script creates a tag that loads https://widget.manycontacts.com/widget.js?a=YOUR_ID, with your account ID instead of YOUR_ID. This very website uses it. It does not add a second number: it must be the one the team already handles in the inbox.
What happens after the click
The customer writes. Someone needs to reply within a reasonable time, not the next day: the 24-hour window lets you reply with free-form text, and the person who wrote from the product page is still looking at their phone.
If you are more than one, that number cannot live on one handset. The website button is the entry point most easily left unattended, because "the website sells by itself". It does not, if the chat says "shortly" and shortly never comes.
Measure clicks if you can, and above all measure how many of those chats get a reply within a few minutes. A button with 200 clicks and 40 unanswered is a team problem, not a CSS one.
For ads, do not have the button and a Click to WhatsApp ad pointing to different numbers. The ad criteria are in Click to WhatsApp ads.
Frequently asked questions
Does the button have to be green?
No. It has to fit your website and be readable. WhatsApp green helps people recognise it. A floating circle with no icon or text, on top of everything, gets in the way more than it converts.
Can I show the button only on mobile?
Yes, and it is often right: on desktop, the WhatsApp chat opens the desktop app or WhatsApp Web, and not everyone has it. With CSS (display by screen width) you hide it on large screens. Do not do it the other way round: hiding it on mobile hides it where it is used.
Are WordPress.com and self-hosted WordPress the same?
On a WordPress where you can edit the theme or add an HTML block, yes. On very locked-down plans you can sometimes only put the link inside a page, not a fixed button. In that case a visible button in the header does the job.
Does the widget replace the API?
No. The widget opens the conversation on the number you have in ManyContacts. If that number is on the API, the chat enters the inbox. If setup is not done, the widget does not do it for you.
Next step
Paste the link in the footer, open your home page on your phone and check the chat is the company's. If replies need to be shared out, the button's destination is the inbox, not a loose phone. Try ManyContacts for 7 days or book a demo.