# 在網頁上新增 WhatsApp 按鈕連結到你的 WhatsApp Business 帳號

## 1. 新增 WhatsApp 按鈕的 html 代碼

首先，你需要在 Header 或 Footer （或任何會在網站每一個頁面都會展示的模組）的 html 加插以下代碼：

<pre><code>&#x3C;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
&#x3C;a href="https://api.whatsapp.com/send?phone=<a data-footnote-ref href="#user-content-fn-1">85298765432</a>&#x26;text=<a data-footnote-ref href="#user-content-fn-2">Inquire</a>" class="float" target="_blank">
&#x3C;i class="fa fa-whatsapp my-float">&#x3C;/i>
&#x3C;/a>
</code></pre>

如果你使用 WordPress 來建立網站，你可以在你所安裝的頁面建立(Page Builder)插件裡找到加入 html 的模塊才能直接加入 html 代碼。以下為 Elementor 的例子：

<img src="/files/MCFouNuXYg270WczKzqy" alt="" data-size="original">

## 2. 新增 WhatsApp 按鈕的 css 代碼

然後，在你的 CSS 文件中加插以下代碼以調整 WhatsApp 按鈕的位置和樣式。

```
.float{
	position:fixed;
	width:60px;
	height:60px;
	bottom:40px;
	right:40px;
	background-color:#25d366;
	color:#FFF;
	border-radius:50px;
	text-align:center;
  font-size:30px;
	box-shadow: 2px 2px 3px #999;
  z-index:100;
}

.my-float{
	margin-top:16px;
}
```

[^1]: 取代此號碼為你的 WhatsApp Business 號碼 (包括區號)

[^2]: 這裡是客戶打開連結時可直接向你發送的預設訊息。你可以按需要隨意修改。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chatalog.ai/zh-hk/settings/chat-widget/add-whatsapp-button-to-your-website-that-links-to-your-whatsapp-business-account.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
