This is homepage for CleanCodeNZ Geo Posts WordPress plugin

The plugin is using custom post type plus google maps api v3 to allow admin to enter custom posts with geo locations then display them on a google map as markers overlay, when individual markers are clicked, an info window will be displayed with the posts content.

The plugin is highly customizable that you can use it to build map functions into your wordpress site like a store locator, real estate listing, or photo spots which is presented here as a demo, etc…

The custom post type is defined with
1. Image field which can be embedded in the pop-up when markers are clicked.
2 .Icon image field which is used for markers image, the image used for icon is automatically resized to 32X32
3. Address field which then can be translated into geo coordinates using geo finder that comes with the plugin.
4. Category field, which can be used to group geo posts into difference categories.

Installation of Plugin
1. Upload this directory to your plugins directory. It will create a ‘wp-content/plugins/cleancodenzgeoposts/’ directory
2. WordPress users should go to their Plugins page and activate “CleanCodeNZ Geo Posts Plugin”.
3. Now go to Settings->CCNZGeoPosts, enter the default zoom level, latitude and longitude for Google maps, and title of the page you want the map on
4. Now go to Geo Posts->Add new, these posts should appear on the map of the page you have set in step 3
5. Then browse to your map page whose title you have entered in step 3 to see those posts you entered in step 4 to appear on map, have fun.

A few screen shots
1. Map page which has geo posts on it.
cleancodenz geo post example

2. Options page
CleanCodeNZ Geo Posts Options

Title of Map Page: is the title of the page that is going to show the map with geo posts. So all the scripts and functions that come with this plugin ONLY activated when Map Page is being displayed.

3. New menu
Menu Access Of Ceo Posts

As this is using custom post type, so ‘Geo Posts’ will be accessible from left menu.

4. Geo Posts data entry
Geo Posts Data Entry

4.1. Image: is the image that will be embedded in pop-up, together with post content, integrated with built in media library
4.2. Location field: this can be used to find the geo coordinates
4.3. Lat and Lon fields are used to locate geo posts on the map
4.4. Category: It is customizable
4.5. Marker image: the plugin will add new image size to media library, 32X32, when you select ‘Google Marker Image’, the 32X32 version of image will be used.

5. Insert a marker image
Select Image for Marker Icon

Tick the box ‘Google Marker Image’

6. Find geo coordinates from address
Geo Coordinates From Address


1. How Can I Change Category:
Plugins-> CleanCode NZ Geo Posts Plugin-> Edit-> geoposts-config.php
Function getAllCategories
You can change the name and icon for existing categories, add new categories

2. How Can I change category icons:
You can either upload the different images with same name to override default icons, or change icons settings in getAllCategories to new images

3. How can I change styling of map:
Plugins-> CleanCode NZ Geo Posts Plugin-> Edit-> geoposts.css

4. How Can I add new fields to Geo Posts type:
Plugins-> CleanCode NZ Geo Posts Plugin-> Edit->geoposts-config.php
getGeoPostsTypes(), you can change and add new fields to geoposts.
Supported field types: image, geolocation, geolatitude, geolongitude, select, markerimage

5. Can I use the same image for both marker overlay and content:
Yes, for marker image, you need tick ‘Google Marker Image’ in your media library, images you uploaded before this plugin is installed, they do not have 32X32 version, so just be aware of that, instead the 32X32 of top left corner of bigger image is taken as the icon

6. How Can I change the content of popup?
Plugins-> CleanCode NZ Geo Posts Plugin-> Edit-> cleancodenzgeoposts.php, find following code. You can change the following line, if you need css, you can add css entries in geoposts.css.

available fields are all fields from geo posts plus content field which is the content of geo post.

$content ='<div>'.
                    '<h1>'.$gp['title'] .'</h1>'.
                    '<div><img src="'.$gp['gp_1_image'] .'"/></div>'.
                    '<div>'.$gp['content'] .'</div>'.               
                    '</div>' ;

Premium version:

In this version fast proximity and category search is supported.

1. Premium Option page:

Premium Option

Premium Option

Two new options:

Search Layout: if it is turned off, there will no search on map page

Use Miles: when search layout is turned on, the default units for distance is km, you can change it to miles by ticking this box.

2. Premium Data entry:

No change at all. if you have been using free version, you will need to bring up your geo post and save it in order for proximity search engine to index your geo posts, for new geo posts, it will be indexed automatically.

3. How to use search:

premium search

premium search

3.1. In the input box enter the central point you want to search from, then click ‘Go to location ’.

You can also pan the map to where you want it to be, the proximity search is based on the central point of map.

If you enter an address and forget to click ‘Go to location’ the map has not moved, so the search will be performed against current map centre, make sure click ‘Go to location’ if you want to nominate a central address.

3.2. enter a numerical number in within box as search radius

3.3. click ‘Search locations’

The results will be listed in a list above map, sorted by the distance, searched locations also have markers on the map.

3.4. Google map ApI key:

Currently there is no API key used, if your website uses map more than the free quota that comes with no API key, you might need an API key for map to continue to function.

Important Links

Download: CleanCodeNZ Geo Posts From WordPress Plugin Directory

Demo: Photo Spots Of New Zealand, a demo of this plugin.
I used this plugin to upload and display photos I have taken around New Zealand during holidays on a map that you can click to see the photo and details of the place.

Buy Premium for NZ$50.00

17 Responses to “CleanCodeNZ Geo Posts WordPress Plugin”

  1. In my search for some code to insert into a real estate website I’m working on I cam across this site. Is this easy to install into WordPress for real estate?



  2. Keith says:

    I was wondering if there is the potential to use this for front end posting? If so, how?

    • CleanCodeNZ says:

      In theory yes, but it will not be a trivial task, as there are a lot to consider if you allow readers to contribute.while wordpress was not built for this purpose. my two cents.

  3. Betsy says:

    I do not know why I can’t see my map. How do I see my post?

    I installed it, & clicked add new & put in the information & saved. But, when I clicked view post, I saw nothing. What step did I miss? Is there a short code to display it?

    • CleanCodeNZ says:

      The plugin will drag posts to a map page which is configured in the back end, the map page is just stand wordpress page. make sure everything is right on options page, you can access option page from settings in the back end under CCNZGeoPosts cheers

  4. Betsy says:

    My map isn’t showing, I installed the plugin & then add new post & then went to view my post, but I see nothing. Is there a short code or a step I am missing?

  5. Betsy says:

    I got it to work!
    I didn’t know that the title matching would make it work, never heard of that. Thanks

  6. Betsy says:

    I didn’t touch the default zoom, its empty.

    I wasn’t sure what to put in there. What should be there?

  7. bessy says:

    i can put this in real estate post ???

Leave a Reply