/** * Function to build properties list * @param array $query: data return from WP_Query function * @param string $width: width class of each prorperty in list * @param string $clear: clear float class - 'clear' or '' * @param int $length: number of words displayed in property's excerp * */ function build_property_list($query, $blockTitle = '', $order = true, $compare = true, $filter = false, $width = 'span3', $clear = '', $length = 25) { if ($query->have_posts()) { $id = 'home-bottom'; ?> <div id="properties-row"> <?php if ($blockTitle != '') { // If has title ?> <div class="title title-widget clearfix"> <h2><?php echo $blockTitle; ?> </h2> <?php if ($compare) { ?> <div class="title-actions title-actions-compare"> <button id="fe-favorites-compare" class="btn btn-mini"><i class="icon-th"></i> <?php _e('Compare', 'wpsight'); ?> </button> </div> <?php } ?> <?php if ($order) { ?> <?php buildOrderOptions(); ?> <?php } ?> </div> <?php } // End if block title if ($filter) { $filterOptions = custom_subpages_filter_form_details(); echo buildFilterForm($filterOptions); } ?> <div class="widget widget-latest row"> <?php while ($query->have_posts()) { // Set up post data $query->the_post(); ?> <div <?php post_class($width . $clear . ' clearfix'); ?> > <div class="widget-inner"> <?php // Action hook before post title (widget) do_action('wpsight_widget_listing_title_before', $width, $id); ?> <h3 class="post-title"> <a href="<?php the_permalink(); ?> " title="<?php the_title_attribute(); ?> " rel="bookmark"> <?php // Action hook post title inside do_action('wpsight_widget_listing_title_inside'); the_title(); ?> </a> </h3> <?php // Action hook after post title (widget) do_action('wpsight_widget_listing_title_after', $width, $id); // Action hook before post content (widget) do_action('wpsight_widget_listing_content_before', $width, $id); ?> <div class="post-teaser"> <?php wpsight_the_excerpt(get_the_ID(), false, $length); ?> </div> <?php if ($compare) { $attr = array(); echo build_compare_table($attr); } // Action hook after post content (widget) do_action('wpsight_widget_listing_content_after', $width, $id); ?> </div><!-- .widget-inner --> </div><!-- .post.<?php the_ID(); ?> --><?php // Increase loop counter $counter++; } // endwhile have_posts() ?> </div> <!-- End properties list --> <?php if ($order) { wpsight_pagination($favorites_query->max_num_pages); } ?> </div> <!-- End container --> <?php } else { if ($blockTitle != '') { // If has title ?> <div class="title title-widget clearfix"> <h2><?php echo $blockTitle; ?> </h2> </div> <div class="property-list-empty"> <?php echo __('No property found.', 'wpsight'); ?> </div> <?php } // End if block title } wp_reset_query(); }
* @package Wpcasa * @subpackage Bayfront * @author anhbp */ ?> <div class="no-header-search"> <?php get_header(); ?> </div> <div id="main-wrap" class="wrap"> <div class="container"> <div class="title title-widget clearfix"> <h2><?php echo get_the_title(); ?> </h2> <?php buildOrderOptions(); ?> </div> <?php the_content(); ?> </div><!-- #content --> </div><!-- #primary --> <?php get_footer();