Note: This guide applies to the Starter, Business & Scale plans.


This article will instruct you on how to embed Trustmary's testimonials and surveys to your site when using the Flatsome theme and editor in WordPress. If you're looking for instructions on the same subject, but for a different WordPress editor, please refer to the main article covering the integrations of Trustmary and WordPress.

Getting the code snippets

Start by navigating to the Widgets section in Trustmary. In there, select a widget or create a new one.

Once in the widget editor, select the Add to website tab at the top of the screen. Here you'll find the code snippets needed to embed the widgets.

What to do with the snippets?

Note, that the two snippets of code serve different purposes.

The first snippet, Trustmary tag, is a global script which enables the loading of the widgets. This script needs to be installed once, either with Google Tag Manager or inside the <head> tag of a website. We recommend installing the script with Tag Manager, as scripts installed like this are activated more reliably. For the installation process, check out this guide.

The second snippet is the embed code itself. This snippet loads a widget into where it is placed on the site.

Embedding the code in Flatsome

Optional: Add the header script manually

If you already installed Trustmary tag with Google Tag Manager, you don't need to worry about this step.

The most simple way of manually installing the widget script onto your WordPress site, is through the WPCode plugin. For instructions on how to install plugins, see the video below.

After the plugin is installed, simply paste the Trustmary tag you've retrieved from the app into the Header text box in the plugin settings and click Save changes.

Once you have the code, you're ready to embed it into your web page.

Embedding the widget

Start by visiting your page through WordPress. Once there, hover the cursor over Edit Page in the WordPress toolbar near the top and click Edit with UX Builder in the drop-down menu.

wp wordpress integration embed flatsome trustmary

On your web page, click on any of the Plus signs and select Text from the sidebar that pops up. You can choose whichever you like of the presets you're presented with after selecting the text element and move to the next step by clicking Apply.

After this, the text element settings are opened, and you should see a text box. This is where you need to paste the code that was copied earlier. The UX Builder shows you an instant preview of the embedding on the right. If everything looks allright in the preview, click Apply to save the element.

Lastly just remember to click Update on the bottom left to publish the changes made to your website, and you're all set!

Did this answer your question?