The Loop

The ListingPress loop works identical to the Wordpress loop.  We used the same theory and vernacular to ensure that the casual Wordpress developer would be able to pick up on it very quickly.

I think this is best illustrated with an example:

<div id="content">

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

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

            <?php the_listing_photos(); ?>

            <h2><a href="<?php the_listing_permalink(); ?>"><?php 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>

        </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>