Hi
I am trying to add a responsive TrustPilot box on my wordpress site running Enfold. The code generated by Trustpilot is:
<script async type="text/javascript" src="//widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js"></script>
And this is to be inserted inside the <head></head> section of your website’s HTML.
How do I go about this ?
Also this code is provided to be put wherever I want the TrustPilot box.
<div class="trustpilot-widget" data-locale="da-DK" data-template-id="539ad60defb9600b94d7df2c" data-businessunit-id="521e26510000640005768ba8" data-style-height="500" data-style-width="100%" data-stars="1,2,3,4,5"></div>
I guess the best way is to put it in a textbox ?
Hope someone can help :-)
Hi Carsten!
Thank you for using our theme.
1) In functions.php at the end put the following:
add_action('wp_head', 'trust_pilot_script');
function trust_pilot_script()
{
echo '<script async type="text/javascript" src="//widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js"></script>';
}
2) I would use a code block element.
See also https://kriesi.at/support/topic/how-to-use-code-block/
Regards,
Günter