# 在 wordpress 上配置网络聊天插件

如果您使用wordpress设置网站，我们建议您使用以下插件在封闭的\</head>之前嵌入代码。

{% hint style="info" %}
在安装插件前，为保障你的网站数据，请先为网站进行备份，以避免插件之间不相容对网站稳定造成影响。以下配置为建议方法，你亦可以选择以其他形式达致相同配置效果，如因插件本身衍生技术问题，本公司恕不负责。
{% endhint %}

<figure><img src="/files/BpsjHyYcGzA2jEMRiE3B" alt=""><figcaption></figcaption></figure>

首先，在 Plugins 页面搜索并安装 Header and Footer Scripts。

<figure><img src="/files/5sLvGHinEtCNmvfMJ7qe" alt=""><figcaption></figcaption></figure>

安装后你可以在 Settings > Header and Footer Scripts 找到有关插件。

<figure><img src="/files/GBgVr0xe0aNWdPUn1NLq" alt=""><figcaption></figcaption></figure>

贴上代码后，点击 Save Settings 储存。

{% hint style="info" %}
如果你在 wordpress 上安装了不同的插件，或有部份会与此段代码不相容而修改了代码导致无法使用。我们建议你插入代码到 footer 位置，并把优先次序设为 99 以避免代码遭到修改。
{% endhint %}

如果你使用 Elementor 来建立网页，所有对 header 或 footer 的修改未必能即时反映在所有网页上。这个情况你可以到Elementor > Tools > 点击 Regenerate Files & Data。

<figure><img src="/files/CEP0uE77xAfwC52rUPCk" alt=""><figcaption></figcaption></figure>

最后你可以在网站上看到 chatalog 的网络聊天了。

<figure><img src="/files/IXTeTTpBNeIhGWQMr7ho" alt=""><figcaption></figcaption></figure>


---

# 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-cn/settings/chat-widget/zai-wordpress-shang-pei-zhi-wang-luo-liao-tian-cha-jian.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.
