Showing posts with label Wordpress. Show all posts
Showing posts with label Wordpress. Show all posts

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.

Friday, November 16, 2012

Adding Adwords conversion code to a Wordpress page

I wanted to add conversion tracking code to a 'thanks' page to track enquiries. It ought to be simpler than it is. You can't just add the javascript code in the HTML view of the specific page (it gets stripped out); an embed-script plugin is over two years since a last update; and the option of adding the code to the theme was a no-go, since it's the specific Thanks page I want to track, and only that page.

But the solution is simple: create a new template, and add the conversion code within it. Specifically:

1. In your theme folder, make a copy of one of your pages.
2. Edit and add the conversion code anywhere within the body.
3. Add a line in the comments at the top to identify this template, e.g. ' * Template Name: Adwords Conversion Code'
4. Save it as say 'conversioncode.php.

The new template with show in the list of available templates in the Page Options section.