• I am using a TripAdvisor widget to display reviews, but it only displays correctly in preview mode. On the normal page it shows up as a tripadvisor logo and link to it′s homepage, but no review box.

    The page I need help with: [log in to see the link]

Viewing 11 replies - 16 through 26 (of 26 total)
  • Theme Author Tom

    (@edge22)

    Did you try with one of the default themes? It would be good to know if it’s something theme-related or something specific to your installation.

    Thread Starter kdric

    (@kdric)

    I switched to the Twenty Twenty theme, and the widget appeared as it did on the Generatepress theme.

    Theme Author Tom

    (@edge22)

    So it must be something else on the site. Can you try using a default theme and no other plugins? If that doesn’t work, then I think there’s an incompatibility with their script and WordPress perhaps.

    I FIXED it!!

    I fixed the problem – probably more thanks to Generatepress Pro and not because of it.

    So, it was obvious that the js script wasn’t running somehow. Which got me thinking if I should just move it to the header.

    So I went in GP, added a hook under Elements, copied only the js part of the Tripadvisor widget into it and then removed that js script part from the html widget that contains the remaining tripadvisor code.

    Saved, cleared cache – runs a charme!

    Thread Starter kdric

    (@kdric)

    Should that fix work for me? If so, can you give me clearer step by step instructions as to what to do?

    Theme Author Tom

    (@edge22)

    Glad you got it working!

    @kdric – sounds like you just need to add the script into the <head> area of your website ??

    Thread Starter kdric

    (@kdric)

    I cut <script async src="https://www.jscache.com/wejs?wtype=selfserveprop&uniq=405&locationId=12925540&lang=en_US&rating=true&nreviews=5&writereviewlink=true&popIdx=false&iswide=false&border=true&display_version=2" data-loadtrk onload="this.loadtrk=true"></script> from the review page and pasted into GeneratePress Child: Theme Header (header.php). Then I cleared cache, but problem persists. What do I need to do?

    Theme Author Tom

    (@edge22)

    Is that the correct code that they provide?

    Are there specific instructions they provide that you can link me to?

    Thread Starter kdric

    (@kdric)

    Theme Author Tom

    (@edge22)

    Hmm, not sure I’m seeing what you’re seeing as I’m not logged in. Can you show me a screenshot of the instructions?

    kdric: Before I moved the code to the header I disabled every single plugin, tested the widget, and re-enabled it. If copying the js code into the header doesn’t work, you should still test all plugins, as they can interfer.

    I copied the js into a hook, using the Generatepress Elements feature. Not sure where that code is actually written to, but that worked for me. You need to enable Elements under the Generatepress setup, then create a hook and paste the code there. then save. That worked for me.

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘TripAdvisor widget only displays correctly in preview mode’ is closed to new replies.