(Old Way) How to configure your WordPress theme template files with Easy Property Listings 1.2.1 or earlier
Every WordPress Theme author writes their code differently and with different CSS classes and in order for complete control over the display of property pages and information we decided against using WordPress content filters as this did not provide the best display solution.
Its an easy fix for novice WordPress developers and users, a bit of copy and paste and you are set.
Easy Property Listings first checks inside your current active theme or child theme for the following two files.
Main Template Files:
It will use the ones inside your child theme instead of the ones included in the plugin which allows you to quickly get setup.
Certain themes like iThemes Builder and Genesis by StudioPress require special code for support. If you are using these frameworks no additional customisation is required as we have included special templates for these frameworks.
The default template is based on the WordPressTwenty Twelve theme however every WordPress theme author is unique and so is their code. What we've done to simplify complete integration with our Real Estate plugin is through 1 simple function for each template file.Archive Listing function
`epl_property_blog();`Single Listing function
How to add an additional wrapper function which will prevent error if Easy Property Listings is deactivated
This variation just adds a check that makes sure the plugin is activated so you don't get any errors.
Archive Listing function - archive-listing.php
Single Listing function - single-listing.php
*Make sure you backup your child theme and make a copy of the files, don't remove the existing files. Open your current theme folder, preferrably a <a href="http://codex.wordpress.org/Child_Themes" title="WordPress Child Themes">child theme</a> to prevent you losing your changes when you update your theme.
Make a copy of your themes archive.php and single.php files and rename them to archive-listing.php and single-listing.php and place these back into your child theme folder.
Sometimes these files are not located inside the child theme. Just look for them inside the parent framework theme folder that your child theme is using. Copy them into your child theme and rename them as above.
Easy Property Listings will now use these files to load the <a href="http://codex.wordpress.org/Post_Type_Templates" title="WordPress Custom Post Types Tempaltes">Custom Post Types Templates</a> the way WordPress works.
A lot of themes have updated to use get_template_part() function since WordPress 3.0 so your goal is to replace that function with the functions above.
Open your new archive-listing.php in your text editor like NotePad++ for PC or Coda on the Mac and look for the get_template_part() which is after the WordPress loop the_post() function.
Here is an example of the Hueman Theme
[caption id="attachment_2845" align="alignnone" width="700"] Heuman Theme original archive.php example[/caption]
[caption id="attachment_2846" align="alignnone" width="701"] Heuman Theme modified archive-listing.php[/caption]
You can see how the different templates work by reviewing the included template files.
Inside are three folders with the templates inside that you can review.
* default (HTML 5 Twenty Twelve) * ithemes-builder * genesis
All these template files are doing is inserting the above functions inside the_post() function.
* If you need help, visit our priority support desk. Send us your single.php and archive.php files from your template and your WordPress and FTP login details so we can help you quickly for a small priority support fee.Updated November 4, 2014