Hi, @melanie71,
Hope you will be fine. ??
I was messing up with code from hours and finally, I found the issue.
The problem is Trip Advisor widget first gets the Javascript source from here https://www.tripadvisor.com/wejs?wtype=selfserveprop&uniq=611&locationId=605777&lang=en_AU&rating=true&nreviews=4&writereviewlink=true&popIdx=false&iswide=true&border=true&display_version=2 and then from here it redirects again here https://www.tripadvisor.com.au/WidgetEmbed-selfserveprop?border=true&popIdx=false&iswide=true&locationId=605777&display_version=2&uniq=611&rating=true&lang=en_AU&nreviews=4&writereviewlink=true and get the actuall Javascript code which takes so many times and it has to connect multiple server to get the permision meanwhile other Javascript files gets load and it doesn’t show beacuse of indeendecny.
Btw I fixed it by getting the code directly from here https://www.tripadvisor.com.au/WidgetEmbed-selfserveprop?border=true&popIdx=false&iswide=true&locationId=605777&display_version=2&uniq=611&rating=true&lang=en_AU&nreviews=4&writereviewlink=true and pasting in new file called trip_advisor_js
and wrapping the code in jQuery(document).ready(function(){ paste the code here });
.
Then I enqueued in the file in theme functions.php file.
And add the following code in the widget or wherever you want.
<div id="TA_selfserveprop611" class="TA_selfserveprop"> <ul id="W1LtFvQGIgS" class="TA_links bbpCscQ"> <li id="24852Lv63" class="JiSl1JG"><a href="https://www.tripadvisor.com.au/" target="_blank" rel="noopener"><img src="https://www.tripadvisor.com.au/img/cdsi/img2/branding/150_logo-11900-2.png" alt="TripAdvisor" /></a></li> </ul> </div>
Problem solved. you can see the screenshot here https://prntscr.com/gt6mqh
Thanks!