WordPress
Add Inclusify to your WordPress website in just a few minutes.
Register the domain first
Add your domain in the Inclusify panel before you paste the script tag. Bundles are built per registered domain, and an unregistered one fails silently: the script URL still returns HTTP 200, but what it serves is a single console.log saying the domain is not registered. There is no error to find and no widget appears.
Method 1: Theme Editor
The quickest way to add Inclusify to a classic WordPress theme. Block themes have no footer.php to edit, so use Method 2 for those. A theme update also overwrites this edit, so Method 2 is the safer choice either way.
Open Theme Editor
Go to Appearance Theme File Editor in your WordPress admin. On a block theme WordPress moves it to Tools Theme File Editor instead.
Find footer.php
In the right sidebar, click on footer.php (or Theme Footer).
Add the Widget Code
Paste this code just before the closing </body> tag:
<script src="https://app.inclusifyapp.com/w/YOUR-DOMAIN.com.js" async></script>Replace YOUR-DOMAIN.com with your actual domain.
Update File
Click Update File to save your changes.
Method 2: Insert Headers and Footers Plugin
Recommended if you want to preserve your changes during theme updates.
- Install and activate the WPCode plugin (formerly Insert Headers and Footers)
- Go to Code Snippets Header & Footer
- Paste the widget code in the Footer section
- Click Save Changes
<script src="https://app.inclusifyapp.com/w/YOUR-DOMAIN.com.js" async></script>Using a Child Theme
If you're using a child theme, add the script using the wp_footer hook in your child theme's functions.php:
add_action('wp_footer', function() {
echo '<script src="https://app.inclusifyapp.com/w/YOUR-DOMAIN.com.js" async></script>';
});Compatibility
- • Works with classic and block themes (block themes need Method 2 or the child-theme hook, not Method 1)
- • Compatible with page builders (Elementor, Divi, WPBakery, etc.)
- • Works with WooCommerce
- • Page caching is fine once you purge it. If a plugin combines, minifies or delays JavaScript, exclude app.inclusifyapp.com from that option
Verify the installation
- Load your site in a private window, then use View Source and search for "inclusifyapp" — the tag should appear near the closing </body>.
- If your host or a plugin runs page caching, purge it first: cached HTML generated before the edit will not contain the script.
- Confirm the widget appears on a post, a page and the home page — some themes use a different footer template for the front page.
Widget bundles are served from a CDN and cached for a few hours. If you changed widget settings in the panel and the site still shows the old configuration, wait for the cache to expire or load the script URL directly with a cache-busting query string (`?v=2`) to confirm the new version is being served.
Troubleshooting WordPress installs
- The widget disappeared after a theme update.
- A direct footer.php edit is overwritten every time the theme updates. Move the script into WPCode (Code Snippets → Header & Footer) or a child theme's functions.php using the wp_footer hook, both of which survive updates.
- The script is in the source but the widget never initialises.
- A minification or "combine JavaScript" option in WP Rocket, W3 Total Cache, Autoptimize or LiteSpeed Cache has rewritten the tag. Add app.inclusifyapp.com to that plugin's JavaScript exclusion list.
- Changes are not visible even in a private window.
- Purge the caching plugin and, if you use one, the CDN in front of it. Hosted platforms such as WP Engine and Kinsta run their own server-side cache that a plugin purge does not clear.
- The browser console reports a Content Security Policy violation.
- A security plugin such as Wordfence or Really Simple SSL is enforcing a CSP. Add https://app.inclusifyapp.com to the script-src and connect-src directives.
WordPress questions
- Which of the three installation methods should I use?
- WPCode if you want the simplest option that survives theme and core updates. A child theme's functions.php if you already maintain one and prefer keeping site code in version control. Editing footer.php directly works but is lost on the next theme update.
- Does it work with WooCommerce?
- Yes. The script loads on every front-end page including shop, product, cart and checkout, because all of them render through the theme footer.
- Does it work with Elementor, Divi or another page builder?
- Yes. Page builders replace the content area but still render the theme's header and footer, so a wp_footer-hooked script loads normally.
- Will it affect my Core Web Vitals?
- The tag is async and loads after the document is parsed, so it does not contribute to Largest Contentful Paint or block rendering. If a caching plugin defers or combines it, test that the deferral has not moved it into the critical path.
Related
- Inclusify for WordPress — what the widget does on a WordPress site, and pricing.
- Script installation — generate the embed code for your domain.
- Customization — position, colour and size of the widget button.