Theme Setup

These instructions are also located inside the plugin. Visit Dashboard > Easy Property Listings > Help > Getting Started > Setup your theme to work with the plugin

If you have never looked at a line of code in your life and you can copy and paste you can do this. We have made this process as easy as possible within WordPress constraints.

Check if we have already created a template for your theme

Visit the  theme templates forum archive and search for your theme as we may have already created the templates for your theme.

Theme Templates for WordPress Themes

Overview

WordPress has filters and hooks for "the_title" and "the_content" but these are not applicable for real estate websites where the address, price bed/bath icons and maps are much more important than categories, date and published by info.

Not performing the setup steps may cause your sidebar to appear in the wrong place or the listing pages appear too wide.

Solution

All you have to do is duplicate some files and copy and paste into them. If all else fails you can use the included shortcodes but these are not nearly as good as implementing the following steps.

Child Theme

If you have ever made the fatal mistake of not using a child theme with your WordPress website like I have, it can be a very expensive mistake to make and one to  avoid at all costs.

Some Theme frameworks or premium themes like  iThemes Builder automatically create a child theme for you when activated, but others will need to be manually created, thankfully a few minutes creating one will save you a lot of time down the road.

Here is  how and why you should always use a child theme with WordPress

No Setup Required For These Themes

iThemes Builder Framework Theme, Genesis Framework by StudioPress, Twenty 12, 13, 14 & 15 by WordPress.

We have a selection of pre configured templates here for many popular themes here.

Stuck?

Not all themes follow WordPress coding standards and these may take a little more time and experience to get working. If you just can not get it to work, visit theme support desk and fill out a priority request.

Future

We hope a future WordPress release adds filter so this can be automatic, but until that happens you are going to have to perform the following steps using copy and paste.

Before attempting the following steps add a test listing and preview it as your theme may already work with Easy Property Listings.

1. Take a backup of your theme and a copy of the files to edit.

Open your favourite FTP program or access the file manager via your hosting panel.

Take a backup of your theme before you start.

Download the single.php file and archive.php from your theme folder and save it to your computer.  If these files are not present in your child theme then copy them from your parent theme folder. If there is no archive.php file use the index.php file. 

On your computer rename single.php to single-listing.php and rename archive.php to archive-listing.php  If using index.php, rename that to archive-listing.php

Upload these new files back into your theme folder.

2. Edit your single-listing.php file.

Default  Easy Property Listings single-listing.php on GitHub.

Open your new single-listing.php file in your text editor like Notepad++.

Look for:

<?php get_template_part( 'SOME_STUFF' , 'MORE_STUFF' ); ?>

which appears after the_post();

Replace:

<?php get_template_part( 'ALL_THE_STUFF' ); ?>

with:

<?php do_action( 'epl_property_single' ); ?>

Save the file and make sure you have sent it to the server. View the test listing you created and you should be done.

Here is an example of the Hueman Theme

Heuman Theme archive-listing.php Heuman Theme original archive.php example

You can see how the different templates work by reviewing the included template files.

Example video on how to configure templates

3. Edit your archive-listing.php file.

Default  Easy Property Listings archive-listing.php on GitHub.

Open archive-listing.php and Look for:

<? get_template_part( 'SOME_STUFF' , 'MORE_STUFF' ); ?>

Which appears after the second.  The first one is usually the page title.

the_post();

Replace:

<?php get_template_part( 'ALL_THE_STUFF' ); ?>

with

<?php do_action( 'epl_property_blog' ); ?>

Save the file and make sure you have sent it to the server. Check the main property page http://YOUR_SITE_URL/property/ and you should be done.

4. Optional for grid and sorter. Edit your archive-listing.php file again.

Insert

<?php do_action( 'epl_property_loop_start' ); ?>

Before the second

the_post();

Check your main property page, if the buttons are in the incorrect place move them until they are in the correct place.

Insert

<?php do_action( 'epl_property_loop_end' ); ?>

After the second

<?php endwhile(); ?>

Check if we have already created a template for your theme

Visit the  theme templates forum archive and search for your theme as we may have already created the templates for your theme.