WhatsApp Button Generator
Build a floating WhatsApp chat button for your website. Choose how it looks and what the first message says, then copy the code and paste it into your pages. No plugin, no monthly fee, and nothing loading from someone else's server.
Live preview. The button is real, try clicking it.
Paste this just before the closing </body> tag
Where do I paste this?
- Open the HTML file for your page, or your theme's footer template.
- Find
</body>near the bottom. - Paste the code immediately above it, then save and upload.
- On WordPress, most themes have a "footer scripts" or "custom HTML" box that does the same job, or you can use a code-snippets plugin.
Do this on every page, not just the homepage. Most visitors land somewhere other than your front page, and a button they cannot see is a button they cannot press.
Why a pre-filled message matters
A blank chat makes the customer compose an opening line, and a fair number will not bother. A pre-filled message removes that work, so all they do is press send. It also tells you where they came from, which is worth more than it sounds: set a different message on your pricing page and your contact page, and your phone starts telling you which page produces enquiries.
Is this better than a WhatsApp plugin?
For most small sites, yes. A plugin loads extra JavaScript, often calls a third-party server, sometimes adds tracking you did not ask for, and occasionally starts charging. The code here is a link and a small amount of CSS. It loads nothing from outside your own site, adds no measurable weight, and cannot stop working because a company changed its plan.
Things worth knowing
- The number must include the country code and no plus sign or spaces. Kenya is 254, so 0758 534 023 becomes 254758534023.
- It must be a number with WhatsApp on it. Landlines will not work.
- On a desktop, the link opens WhatsApp Web, so the visitor needs to be signed in there.
- The code respects the visitor's reduced-motion setting, so the greeting bubble will not animate for people who have asked their device to limit animation.
Built by LEWPAT Kenya Technologies, a web design and development studio in Nairobi. If your website is getting visitors but not enquiries, tell us what you're working on.