How to Add the LeadTruffle Texting Widget to WordPress
LeadTruffle Insights

How to Add the LeadTruffle Texting Widget to WordPress

Add a WordPress texting widget with LeadTruffle. Follow the script installation steps, check SMS consent, and test lead capture on desktop and mobile.

Quick answer

tl;dr: To add a WordPress texting widget, copy the entire Website Texting Widget snippet from LeadTruffle, install it using a supported custom-code method, and test the published page. The widget asks for the visitor's name and mobile number, and the rest of the conversation happens via SMS. Check the consent choice and account settings before expecting an automatic first text.

Before you install

You need WordPress administrator access, a LeadTruffle account and permission to add JavaScript. Back up the site before altering the way that scripts are loaded.

For self-hosted WordPress, use a maintained snippet plugin or your developer's existing script-management method. If you're using WordPress.com, make sure your plan and activated hosting features allow the required plugin and JavaScript. If the platform filters out script tags, a Custom HTML block is not a reliable alternative.

Step 1: Copy your current LeadTruffle snippet

Open the LeadTruffle website widget settings and copy the entire installation code for the Website Texting Widget. Do not alter its company identifier nor its initialization code. Include the snippet generated by the account, not a script URL from a previous article.

The floating texting widget, popup and inline lead form are different display options. Copy the one you want to install.

Step 2: Add the snippet with WPCode

If your site already has a trusted header/footer code tool, use it rather than installing another one.

If not, in WordPress navigate to Plugins β†’ Add New, search for WPCode, install and activate it. The plugin was previously called Insert Headers and Footers, but it is now known as WPCode.

Open its header/footer interface, paste in the entire widget snippet in the spot where LeadTruffle told you to, and save. Use the footer field, if your snippet can be installed in the footer, follow any account-specific placement instructions.

Avoid adding HTML script tags to a snippet that is only PHP. Do not load a widget into more than one location, because it can cause a theme, plugin and tag manager to load the widget.

Step 3: Clear caches and test the live site

Clear the WordPress page cache and any CDN cache, then view the public site in a private browser window. Check the home page and a service page on desktop and mobile.

If the widget is missing, check whether an optimization plugin delays or blocks its script. Ask your web administrator before excluding the affected script. Also check whether a consent manager or browser extension is blocking it.

Should you edit header.php instead?

A snippet plugin is more user-friendly for most business owners. Parent theme edits may be lost with updates, and block themes might not have all of the same files as older themes. For an agency that handles scripts in code, have them do this via the theme or plugin process maintained by the site.

A useful setup for a contractor website

On a plumbing site, the greeting could invite visitors to text about a repair. Qualification can then ask what is happening, where the property is and when help is needed. Keep a contact form and phone number available for visitors who prefer them.

There are other set up steps involved in a supported Jobber/CRM connection. This script will not install a native Jobber WordPress plugin and does not ensure that all contacts are booked into a job.

Try both submission paths in LeadTruffle's opt-in guide. If the visitor checks the SMS consent box, the widget can start the automated text conversation. Otherwise, it saves the contact and offers a QR code or Text Us Now link for the visitor to initiate the text. An unchecked submission does not create an Inbox conversation automatically.

Do not alter the provided notice or opt out procedure. The checkbox is a component of the messaging workflow, it is not a representation of compliance for all future usage of the number.

Refer to the information on the AI's business, qualification questions, and handoff rules. If you wish to pass any details to your team in the CRM, connect the appropriate supported CRM integration. The supported actions of that integration, and your configuration, will dictate direct booking.

Measure useful outcomes

Separate tracking of widget submissions, started conversations, qualified inquiries and bookings. A contact does not necessarily convert to a qualified lead or completed appointment.

In paid traffic, you are going to take a tagged test URL and review the Attribution & Tracking information for the lead. LeadTruffle logs the capture of available campaign and page context, if not captured or blocked, it should be investigated rather than assumed present. See the attribution guide.

FAQs

Does LeadTruffle require a dedicated WordPress plugin?

The widget can then be added to the website using the JavaScript snippet generated. One way to put that code is by using a header/footer plugin.

Will it disappear when I update the theme?

Snippets outside the parent theme are less dependent on theme files. Test the live site after theme changes and major updates.

Can I use the free WordPress.com plan?

Review WordPress.com's current custom-code and plugin requirements. Do not assume a plan that filters JavaScript can run the widget.

Will the conversation happen inside WordPress?

The Website Texting Widget receives the request on the site and carries out the qualification process via SMS. This is not a full browser live-chat conversation experience.

See the widget in action

Schedule a LeadTruffle demo and discover how a WordPress website inquiry can keep going as a beneficial text conversation. There's also an opportunity to check out the Website Texting Widget prior to choosing your configuration.