How-To Create a Real Estate Search Page in WordPress

Posted on 26. Jan, 2009 by Joshua Ferris in Blog, Customizing WordPress, Featured, WordPress

Nearly all real estate search pages are merely pages on an agent or broker’s site that frames in a search page from a third party real estate search vendor.

When you decide to add a real estate search to your website you are going to need to iframe the page into your page by doing the following:

1. Locate your single.php file within the active theme’s folder.

2. Open the single.php file with a text editor like TextEdit (Mac) or Notepad (Windows). Alternatively, you could use a more powerful HTML editior like Dreamweaver (Windows/Mac) or Coda (Mac) but those programs are really overkill when it comes to simply adding a line of code to your page.

3. At the top of the code you are going to need to create a template name for the page so that when you create your real estate search from the WordPress backend it will have your pre-made template available to choose (I’ll explain more about this in a minute.)

Here’s how you add a template name to your page:

Paste the following code at the top of the file:

<?php

/*

Template Name: Real Estate Search Page

*/

?>

This php code will make your page appear as a template file so that you can use the template (with your real estate search embedded) on your website.

4. Now you need to add your real estate search link to the template by inserting the iframe code between your header and footer code.

The code you need to place is below:

<p><iframe src="http://idxlink.com" width="100%" height="2000px" scrolling="yes" frameborder="0"></iframe></p>

Note: If you use Diverse Solutions or other IDX providers that provide their IDX solution through a script then you wouldn’t need to iframe the search into your page because the script will take care of all that. What you do in this scenario is follow the instructions above but replace the code with the script link from your provider.

5. Save your page and go into your WordPress dashboard.

6. Go to Pages -> Add New.

7. Type the name of the title you want for your real estate search page. I titled mine “Real Estate Search”.

8. On the right side, in the “Attributes” menu, go to the Template section.

9. Click on the Template drop down and select “Real Estate Search Page” from your options.

10. Publish your page. You have now integrated real estate search into your website! Congrats!

Questions, comments or suggestions? Leave a comment below!

Tags: , , , ,

3 Responses to “How-To Create a Real Estate Search Page in WordPress”

  1. Christian 17 February 2009 at 5:35 am #

    I was wondering if you knew, after accomplishing what you’ve described here, if it was possible to place links in the wordpress sidebar that open up a specific property in the iframe you’ve created. I know what the link would be, I just can’t figure out how to set the location that link opens up.
    It would sort of be like using an old fashioned “frameset” where you place a link and set the location for it to open, but I can’t figure out how to do that in wordpress. Thoughts? Expert friend I could ask?
    Cheers,
    Christian

  2. Joshua Ferris 17 February 2009 at 7:52 am #

    Christian – The code above is for a full width page template with no sidebar which is required by most IDX solutions I’ve used because there isn’t enough room for both the search and the sidebar. I imagine you could frame in a sidebar (though multiple frames is website design taboo) or use a search that is capable of sitting side-by-side with a sidebar but the easiest way of going about it would be to have your framed in page come with a sidebar built-in. For what you would like to do I don’t know that its possible to have an iframed page on the left load whatever you click on in the sidebar because by its nature an iframe page is a separate page loaded within the template of another page. In other words the iframe is, to my knowledge, only capable of loading one link (the one coded into the iframe’s page) and not multiple links from one page.

    Sorry I couldn’t be more helpful as the complexity of your issue is a bit beyond my scope but do try webmaster/web design forums where they may be able to give you a more definitive answer.

  3. Christian 17 February 2009 at 1:32 pm #

    Thanks for the response.
    It seems like it would be so easy…like using the “target” parameter in a frameset (which, yes, I know are taboo!). Just have a link in the sidebar open up it’s URL in an iframe in a custom page template…. It’s how to point/direct that’s the problem!
    Oh well. The worst questions are the ones you have when you think you are so close to a solution!
    Again, thanks for the quick response.


Leave a Reply