* User: vivekbhusal
 * Date: 12/09/15
 * Time: 3:59 PM
 */
$quality_pro_options = theme_data_setup();
$current_options = wp_parse_args(get_option('quality_pro_options', array()), $quality_pro_options);
$args = array('posts_per_page' => 3, 'offset' => 0, 'category' => '', 'category_name' => '', 'orderby' => 'date', 'order' => 'DESC', 'include' => '', 'exclude' => '', 'meta_key' => '', 'meta_value' => '', 'post_type' => 'house', 'post_mime_type' => '', 'post_parent' => '', 'author' => '', 'post_status' => 'publish', 'suppress_filters' => true);
$posts_array = get_posts($args);
?>
<div id="latest">
    <?php 
foreach ($posts_array as $house) {
    ?>
        <?php 
    $permalink = get_post_permalink($house->ID);
    $property = \titanium\TitaniumCommunityClass::getPropertyDetailsByPostID($house->ID);
    ?>
        <div class="col-md-4 col-sm-6 latest-property">
            <a href="<?php 
    echo $permalink;
    ?>
" class="latest-property-item-link">
                <div class="latest-property-info">
                    <span class="latest-property-address"><?php 
    echo $property['address'];
    ?>
</span>
                    <div class="latest-property-row">
                        <?php 
    $airConditionClass = $property['air_conditioner']['has'] == '0' ? 'latest-property-air-conditioner-icon-grey' : 'latest-property-air-conditioner-icon';
    $heaterClass = $property['heater']['has'] == '0' ? 'latest-property-heater-icon-grey' : 'latest-property-heater-icon';
Esempio n. 2
0
    // Send both house details and community details
    $title = getHouseTitle($postal_code);
    $post = get_page_by_title($title, OBJECT, 'house');
    if ($post != null && $post instanceof \WP_Post) {
        // Get both house and community by post id
        $post_id = $post->ID;
        $propertyDetails['success'] = true;
        $propertyDetails['data'] = \titanium\TitaniumCommunityClass::getPropertyDetailsByPostID($post_id);
    } else {
        $propertyDetails['success'] = false;
        $propertyDetails['message'] = "The information about this address <b>" . $title . "</b> is not available.<br/>We will try to get the information as soon as possible, meanwhile you can view the<br/>information related to that suburb. Also please make sure address you search is case sensetive";
    }
}
// Send community details anyway
// Get only community and near by house
$communityDetails['data'] = \titanium\TitaniumCommunityClass::getCommunityDetailsBySuburb($suburb);
//unset($communityDetails['data']['suburb_info']);
$response = array();
//Add property details to response array
if (isset($propertyDetails)) {
    $response['resident'] = $propertyDetails;
}
//Add community details to response array
if (isset($communityDetails)) {
    $response['community'] = $communityDetails;
}
//Output the final design
wp_send_json_success($response);
/**
 * Building the title of post with address
 * @param $postcode String postcode of suburb
<?php

get_header();
?>
  <div class="page-seperator"></div>

<?php 
$post = get_post();
$property = \titanium\TitaniumCommunityClass::getPropertyDetailsByPostID($post->ID);
$community = \titanium\TitaniumCommunityClass::getCommunityDetailsByPostID($post->ID);
//var_dump(get_post_meta($post->ID));
//var_dump($community);
?>


<div id="energy-rating-section" class="property-info qua_heading_title container">
  <h1 class="property-title"><?php 
echo $property['address'];
?>
</h1>
  <div class="qua-separator"></div>
  <div class="address">
    <div class="property-photo">
    <?php 
if ($property['nathers']['has'] == '1') {
    ?>
      <img id="verified" src="/wp-content/themes/quality/images/verified.png" style="display: block"/>
    <?php 
} else {
    ?>
      <img id="unverified" src="/wp-content/themes/quality/images/unverified.png" style="display: block"/>