Tuesday, June 10, 2014

Using TripAdvisor review widgets in WordPress

TripAdvisor reviews are the life-blood of any hotel, but if your website is run on WordPress, you'll be hard pushed to add their widgets to your site (WordPress doesn't like the <script> side of the widget).

For a while, the workaround was to use the TripAdvisor RSS feed for your property, until TA stopped even that a few days ago.

The solution is fiendishly devious: pull the code from a simple html page on your server using an IFRAME in your post or page. Specifically:

1. Get your review widget code, and save to a file called say ta_review.htm
2. FTP the ta_review.htm page to your web server.
3. Insert an IFRAME in your post/page (don't forget to switch to HTML view). Something like this:

<iframe src="http://www.yourwebsite.com/ta/ta_review.htm" height="600" width="500" frameborder="0"></iframe>

4. And Robert is truly your mother's brother.