The Search Template

While you can add a ListingPress loop to any current theme template, to take full advantage of the seo and custom url structure, it is recommended that you create two more templates.

ListingPress will automatically use the listings.php template for any search being done if that file is located in your theme folder.  On the search template there are various functions that will call up different listing values.  Here are a list of the variables that can be used.

Outside the loop:

the_google_map('width','height');
previous_listings('Previous Listings');
next_listings('Next Listings');

Inside the loop:

the_listing_id();
the_address();
the_city();
the_state();
the_zip_code();
the_bedrooms();
the_bathrooms();
the_sales_price();
the_mls_id();
the_property_type();
the_sqft();
the_lot_size();
the_year_built();
the_status();
the_latitude();
the_longitude();
the_listing_permalink();
the_listing_photos('number','size');
the_agent();
the_office();
the_dom();

An example search listings template:

listings.php

<?php get_header(); ?>

<div id="content">

    <?php if( have_listings() ): while( have_listings() ): the_listing(); ?>

        <div id="<?php the_listing_id(); ?>" class="listing">

            <?php the_listing_photos('1','medium'); ?>

            <h2><a href="<?php the_listing_permalink(); ?>"><? the_sales_price(); ?></a></h2>
            <p class="address"><?php the_address(); ?><br />
            <?php the_city(); ?><br />
            <?php the_state(); ?>, <?php the_zip_code(); ?></p>

            <p class="details">Beds: <?php the_bedrooms(); ?><br />
            Baths: <?php the_bathrooms(); ?><br />
            MLS ID: <?php the_mls_id(); ?><br />
            Property Type: <?php the_property_type(); ?><br />
            SQFT: <?php the_sqft(); ?><br />
            Lot Size: <?php the_lot_size(); ?><br />
            Year Built: <?php the_year_built(); ?></p>

            <p>Provided By: <?php the_office(); ?></p>

        </div>

    <?php endwhile; ?>

        <div class="navigation">
            <div class="alignleft"><?php previous_listings('&laquo; Previous Listings') ?></div>
            <div class="alignright"><?php next_listings('Next Listings &raquo;') ?></div>
        </div>

    <?php else: ?>

        <h2 class="center">Not Found</h2>
        <p class="center">Sorry, but you are looking for something that isn't here.</p>
        <?php get_search_form(); ?>

    <?php endif; ?>

</div> <!-- //content -->

<?php get_sidebar(); ?>

<?php get_footer(); ?>