PluginProbe
Property Hive / 1.4.53
Property Hive v1.4.53
2.3.0 2.2.6 2.2.5 2.2.4 2.2.3 2.2.2 1.4.46 1.4.47 1.4.48 1.4.49 1.4.5 1.4.50 1.4.51 1.4.52 1.4.53 1.4.54 1.4.55 1.4.56 1.4.57 1.4.58 1.4.59 1.4.6 1.4.60 1.4.61 1.4.62 All 260 releases
propertyhive / templates / content-property.php

content-property.php in Property Hive 1.4.53, at templates/content-property.php

77 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The template for displaying a single property within search results loops.
4 *
5 * Override this template by copying it to yourtheme/propertyhive/content-property.php
6 *
7 * @author PropertyHive
8 * @package PropertyHive/Templates
9 * @version 1.0.0
10 */
11
12 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
13
14 global $property, $propertyhive_loop;
15
16 // Store loop count we're currently on
17 if ( empty( $propertyhive_loop['loop'] ) )
18 $propertyhive_loop['loop'] = 0;
19
20 // Store column count for displaying the grid
21 if ( empty( $propertyhive_loop['columns'] ) )
22 $propertyhive_loop['columns'] = apply_filters( 'loop_search_results_columns', 1 );
23
24 // Ensure visibility
25 if ( ! $property )
26 return;
27
28 // Increase loop count
29 ++$propertyhive_loop['loop'];
30
31 // Extra post classes
32 $classes = array('clear');
33 if ( 0 == ( $propertyhive_loop['loop'] - 1 ) % $propertyhive_loop['columns'] || 1 == $propertyhive_loop['columns'] )
34 $classes[] = 'first';
35 if ( 0 == $propertyhive_loop['loop'] % $propertyhive_loop['columns'] )
36 $classes[] = 'last';
37 if ( $property->featured == 'yes' )
38 $classes[] = 'featured';
39 ?>
40 <li <?php post_class( $classes ); ?>>
41
42 <?php do_action( 'propertyhive_before_search_results_loop_item' ); ?>
43
44 <div class="thumbnail">
45 <a href="<?php the_permalink(); ?>">
46 <?php
47 /**
48 * propertyhive_before_search_results_loop_item_title hook
49 *
50 * @hooked propertyhive_template_loop_property_thumbnail - 10
51 */
52 do_action( 'propertyhive_before_search_results_loop_item_title' );
53 ?>
54 </a>
55 </div>
56
57 <div class="details">
58
59 <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
60
61 <?php
62 /**
63 * propertyhive_after_search_results_loop_item_title hook
64 *
65 * @hooked propertyhive_template_loop_floor_area - 5 (commercial only)
66 * @hooked propertyhive_template_loop_price - 10
67 * @hooked propertyhive_template_loop_summary - 20
68 * @hooked propertyhive_template_loop_actions - 30
69 */
70 do_action( 'propertyhive_after_search_results_loop_item_title' );
71 ?>
72
73 </div>
74
75 <?php do_action( 'propertyhive_after_search_results_loop_item' ); ?>
76
77 </li>