Trustpilot

Hello There
I am trying to add the Trustpilot rating widget to my website.

I need to insert the following:

Copy-paste this code inside the section of your website’s HTML or as close to the top of the page as possible.

I am currently adding this to the custom JS area although I notice that I shouldn’t include the tags and cannot get this to work - could you please advise me of the code to use instead?

The html that I’m adding to the html footer widget is the following:
***

Trustpilot

Many Thanks

Hi There,

Thanks for writing in! First you need to include the JS file to the site. Basically you can add the following code into your child theme’s functions.php file and include your script. If you don’t have a child theme setup, please refer (https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57).

Replace add your script here with your script <script src="path.to/your/file.js">

add_action( 'wp_footer', 'custom_javascript', 10 );

function custom_javascript(){
      echo 'add your script here';
}

Then you can try adding the HTML code into a Text widget area.

Hope that helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.