Craig Kerwien writes the Terra Incognita blog dedicated to sharing travel adventure stories. He uses WordPress as his blogging platform and recently added a Live Search Maps exploration tool to the site. Try it out then read on below for a few tips on how to add Live Maps to your own WordPress site

Here's a quick and easy way to add VE to a page hosted with Wordpress. While the instructions are fairly simple, they do require that you have your own install of Wordpress where you can edit the template source code of your blog theme. This means they will not work with a hosted blogging service, such as on Wordpress.com, where javascript is not permitted. These instructions work with Wordpress v2+. If you run into any nuances, feel free to post a comment below.

How it works

If you ever tried to copy a VE script and paste it into a new page created with your Wordpress dashboard, you'll discover that you get a garbled mess. The solution is to create a new page template that contains all of the VE code, upload it to your theme directory, then use that template for your new VE page. You'll be able to provide whatever HTML and javascript you want on the page, as long as it sits within the Wordpress page template code.

Wordpress page template code

/*
Template Name: Name of your page template goes here
*/
?>

VE code goes here

See it in action

Here is a simple VE location search: http://terra.incognita.ws/find-a-place/

The page template code for this search is here:

/*
Template Name: FindPlace
*/
?>

**

*****

*****

**

**


**
**

******

******

*****
Try "Glacier National Park", "Area 51", or "Sydney"


****

*


Production instructions

  1. Create the page template locally using your favorite text or code editor. Make sure the filename extension is ".php". Example: FindPlace.php
  2. Upload your page template to your blog's theme folder using FTP or related tool. This folder will be the same one containing the default page templates and other theme files. If you have customized the code on your blog, you probably know where this is.
  3. Go to the Dashboard of your blog. Click on the Write menu, then Write Page.
  4. Select the new template from the Page Template: option on the right column. In this example, the template name would be "FindPlace'.
  5. Click the Create New Page button to publish your page. Notice there is no need to insert anything for the page title or page content - the template just publishes the page in its entirety.

Enjoy!

Click here to view the full post.