2022-02-14 16:41:39 +01:00
---
2023-12-22 09:13:53 +01:00
title: WordPress
2022-02-14 16:41:39 +01:00
---
Typebot has a native [WordPress plug-in](https://wordpress.org/plugins/typebot/) that helps you embed typebots in your WordPress site.
Of course, before using it, you need to create and publish your first typebot.
2023-12-22 09:13:53 +01:00
<Frame>
<img src="/images/embeddings/wordpress-preview.png" alt="WP plugin preview" />
</Frame>
2022-02-14 16:41:39 +01:00
2023-02-21 15:25:14 +01:00
The code snippet to paste is easily configurable in the Share tab of your bot after clicking on the "Wordpress" button.
2022-02-14 16:41:39 +01:00
2023-09-25 11:07:08 +02:00
## Excluded pages
The excluded pages input is a comma-separated list of pages where you don't want your typebot to appear.
Examples:
- `/app/*` will exclude all pages starting with `/app/`
- `/app` will only exclude the `/app` page
- `/app?param=1` will only exclude the `/app` page **and** with the `param` query parameter set to `1`
- `/app?param=*` will exclude the page at `/app` **and** with the `param` query parameter set to anything
- `/app/*?param=*` will exclude all pages starting with `/app/` **and** with the `param` query parameter set to anything
2022-06-07 15:23:19 +02:00
## Personalize user experience
2022-02-14 16:41:39 +01:00
2023-12-22 09:13:53 +01:00
You can leverage the [prefilled variables](../../editor/variables#prefilled-variables) and inject your user information directly into your typebot so that the experience is entirely customized to your user.
2022-02-14 16:41:39 +01:00
2022-06-07 15:23:19 +02:00
Here are the available variables from WordPress, make sure to create them in your typebot's variables dropdown:
2022-02-14 16:41:39 +01:00
2023-12-22 09:13:53 +01:00
<Frame style={{ maxWidth: '400px' }}>
<img
src="/images/embeddings/wp-variables.png"
alt="WP predefined variables"
/>
</Frame>
2022-06-07 15:23:19 +02:00
2023-11-27 14:24:44 +01:00
The only thing you need to do to enable this is:
- Use the [Wordpress Typebot plugin](https://wordpress.com/plugins/typebot)
- Have the variables declared in your Typebot with the exact syntaxes. For the email for example, make sure your variable is spelled `WP Email`. These won't work: `wp Email`, `WP email`.
2022-02-14 16:41:39 +01:00
## Your typebot isn't showing?
2023-02-25 08:53:17 +01:00
### You have litespeed with "Localise Resources" enabled
There is an a box where there is a list of URLs it localises, one of them was ‘ https://cdn.jsdelivr.net’ . This URL should be removed from it since it is used to import the embed library.
2023-03-09 14:59:23 +01:00
## You have litespeed with cache enabled
Make sure to insert `web.js` and `typebot` in the JS Excludes textbox and JS Deferred Excludes under Tuning Settings.
2022-02-14 16:41:39 +01:00
### You have a cache plugin
Plugins like WP Rocket prevent Typebot to work.
For WP Rocket:
1. Go to Settings > WP Rocket > Excluded Inline Javascript:
2023-12-22 09:13:53 +01:00
<Frame>
<img src="/images/embeddings/wp-rocket.png" alt="WP Rocket" />
</Frame>
2022-02-14 16:41:39 +01:00
2. Type "typebot"
3. Save
### You have plugin that adds `defer` attribute to external scripts
You need to add an exception for Typebot in the corresponding plugin config.
### Still not working
Contact me on the application using the typebot at the bottom right corner