Custom Post Types, Taxonomies, Templates With a LightBox

by Russell on March 17, 2011 · 5 comments

in wordpress

I have changed the niche in this example to real estate property to protect client confidentiality. The principles and techniques involved in using custom post types, custom taxonomies and custom templates remain the same.

Client Requirements

A client came to me with a request to have a lightbox slideshow of real estate and wondered if they could use my Slickr Flickr WordPress plugin. This would require moving all their photos on to Flickr however they wanted the click-through from the photos NOT to go Flickr but to individual property details pages.

Moreover, the client wanted full flexibility over the categorization of the property: by type, by regional location and by price range without my having to get involved in any subsequent development. But more importantly it would allow her to recategorize and reclassify as the number of properties grew from a handful to several hundred. Also some properties were ‘sold’ on other websites on a split commission basis so sometimes the ‘property details page’ would be on her site but more often it would be on another real estate agent’s site.

Here was an opportunity to build something really fast by leveraging the power of using WordPress as a content management system.

Building A Real Estate Website In Less Than A Day

Design and Development Activites

The solution I came up with was as follows:-

  1. Create a new Custom Post Type called Property
  2. Create a taxonomy “Property Type” e.g (Apartment, Condo, Villa, Plot of Land, Beach Front, etc)
  3. Create a taxonomy “Region” e.g (Miami, Fort Lauderdale, Orlando, Talahassee, Carribbean, Canada, Europe)
  4. Create a taxonomy “Price” e.g. (<50k, 50-100k, 100-200k, 200k-300k, >300k etc)
  5. Build a custom archive template which does the following
    • Displays a sub-title for each the region
    • Displays a ‘teaser’ for each property that has the thumbnail photo with a click-through to a lightbox slideshow of all properties in the region
    • Beneath each thumbnail is a caption with the short description with a click through to the property page
    • In the LightBox you have the large picture of the property, the longer description and link
  6. Access to the custom template is achieved using a URL such as: ../property/property-type/condos
  7. Create clickable sidebar widget to drive traffic through to the custom template.

Client Setup Activities

The client is only concerning with uploading photographs and adding property descriptions

  1. Upload large and thumbnail size photos on Amazon S3 (or uploads them to the media library)
  2. Create a sidebar widgets (i.e. an ad) for each type of property containing a clickable image with a link through to the custom template
  3. Add a “property” custom post type for each property giving
    • Single Line Property Description is the post title
    • Property Long Description is the post content
    • Property URL as a custom field
    • Large Property Photo as a custom field – URL of photo on Amazon S3
    • Small Property Photo as a custom field – URL of thumbnail on Amazon S3
    • Property Price as a custom field
    • Tag the Property with one of more appropriate “property types”
    • Tag the Property with one of more appropriate “region”
    • Tag the Property appropriate “price range”
  4. As and when required change the property types according to the properties that come on line
  5. As and when required change the price ranges according to the properties that are currently available
  6. As and when required change the regions according to the current property locations

Advantages of Using WordPress as a CMS (Content Management System)

  • Gives the client full control of the property data using standard WordPress
  • Gives the client control over the classifications of price ranges, locations and property types using standard WordPress
  • Minimal code development (just a single template – about 4 hours work)
  • Easy to expand property data in the future should the client wish to using custom post fields
  • Can locate the photos and thumbnails on Amazon S3
  • Uses standard jquery LightBox

In summary, these are the real benefits of WordPress: high flexibility and minimal cost.

I have implemented the solution for the client earlier this week however I will be putting up detailed tutorials with code examples here over the next few days as I build the property website in a subfolder of the site.

Click to Subscribe to WordPressWise and be notified as soon as I make the next post on building a property website in a day.

{ 5 comments… read them below or add one }

isela July 12, 2011 at 5:12 am

did you ever get around to the post on howw to build the realtor website in a day? I am very interested in this. it is exactly what I have been looking for
Thank you so much! Isela

Russell July 12, 2011 at 12:05 pm

Sadly, not yet – due to client work and plugin development work it has taken a back seat. It is probably going to be October before I get back to it

Isela July 12, 2011 at 8:02 pm

Thanks for the quick reply. Maybe you can do a one on one and i ca pay for it?
Let me know when you can breathe. Thanks
isela

Henry January 25, 2012 at 1:35 pm

Great post. If you’d like to add a location search feature to your real estate website then you can install the WP Geo or Geo Mashup plugins. Both very good.

Henry

Russell January 25, 2012 at 3:26 pm

Thanks Henry – that’s a great idea! I will check these plugins out.

Leave a Comment

CommentLuv badge

Spam Protection by WP-SpamFree

Previous post: