コード例 #1
0
// Homepage Properties Loop
if ($home_properties_query->have_posts()) {
    ?>
<div class="property-listing-two fade-in-up <?php 
    echo inspiry_animation_class();
    ?>
">
    <div class="container">
        <div class="row zero-horizontal-margin">
        <?php 
    $properties_count = 1;
    $columns_count = 4;
    // todo: add the ability to change number of columns between 2, 3, 4
    while ($home_properties_query->have_posts()) {
        $home_properties_query->the_post();
        $home_property = new Inspiry_Property(get_the_ID());
        ?>
            <div class="col-xs-6 custom-col-xs-12 col-md-4 col-lg-3 zero-horizontal-padding <?php 
        echo inspiry_col_animation_class($columns_count, $properties_count) . ' ' . inspiry_animation_class();
        ?>
">
                <article class="hentry property-listing-home meta-item-half">

                    <div class="property-thumbnail">
                        <?php 
        inspiry_thumbnail();
        ?>
                    </div>
                    <!-- .property-thumbnail -->

                    <div class="property-description">
コード例 #2
0
    include get_template_directory() . '/images/svg/arrow-left.svg';
    ?>
</a>
                <a class="carousel-next-item next"><?php 
    include get_template_directory() . '/images/svg/arrow-right.svg';
    ?>
</a>
            </div>
        </div>

        <div class="similar-properties-carousel">
            <div class="owl-carousel">
                <?php 
    while ($similar_properties_query->have_posts()) {
        $similar_properties_query->the_post();
        $similar_property = new Inspiry_Property($post->ID);
        ?>
                    <article class="hentry clearfix">

                        <figure class="property-thumbnail">
                            <?php 
        inspiry_thumbnail('post-thumbnail');
        ?>
                        </figure>

                        <div class="property-description">
                            <div class="arrow"></div>
                            <header class="entry-header">
                                <h3 class="entry-title"><a href="<?php 
        the_permalink();
        ?>
コード例 #3
0
ファイル: slider.php プロジェクト: Juni4567/mycashflow
 */
global $inspiry_options;
$number_of_slides = intval($inspiry_options['inspiry_home_slides_number']);
if (!$number_of_slides) {
    $number_of_slides = 3;
}
$slider_args = array('post_type' => 'property', 'posts_per_page' => $number_of_slides, 'meta_query' => array(array('key' => 'REAL_HOMES_add_in_slider', 'value' => 'yes', 'compare' => 'LIKE')));
$slider_query = new WP_Query(apply_filters('inspiry_slider_query_args', $slider_args));
if ($slider_query->have_posts()) {
    ?>
    <div class="homepage-slider slider-variation-one flexslider slider-loader">
        <ul class="slides">
            <?php 
    while ($slider_query->have_posts()) {
        $slider_query->the_post();
        $slider_property = new Inspiry_Property(get_the_ID());
        $slider_image = $slider_property->get_slider_image();
        if (!empty($slider_image)) {
            ?>
                    <li>
                        <div class="slide-overlay hidden-xs">
                            <div class="container">
                                <div class="slide-inner-container">
                                    <div class="row">
                                        <div class="col-lg-6">
                                            <h3 class="slide-entry-title entry-title">
                                                <a href="<?php 
            the_permalink();
            ?>
" rel="bookmark"><?php 
            echo get_inspiry_custom_excerpt(get_the_title(), 6);
コード例 #4
0
 /**
  * Output options for maximum price select box in property search form
  */
 function inspiry_maximum_prices_options()
 {
     global $inspiry_options;
     $max_prices = array(5000, 10000, 50000, 100000, 200000, 300000, 400000, 500000, 600000, 700000, 800000, 900000, 1000000, 1500000, 2000000, 2500000, 5000000, 10000000);
     // Get values from theme options and convert them to an integer array
     $inspiry_max_prices = $inspiry_options['inspiry_maximum_prices'];
     if (!empty($inspiry_max_prices)) {
         $max_prices_strs = explode(',', $inspiry_max_prices);
         if (is_array($max_prices_strs) && !empty($max_prices_strs)) {
             $new_max_prices = array();
             foreach ($max_prices_strs as $price_str) {
                 $price_num = doubleval($price_str);
                 if ($price_num > 1) {
                     $new_max_prices[] = $price_num;
                 }
             }
             if (!empty($new_max_prices)) {
                 $max_prices = $new_max_prices;
             }
         }
     }
     $maximum_price = '';
     if (isset($_GET['max-price'])) {
         $maximum_price = doubleval($_GET['max-price']);
     }
     if ($maximum_price == 'any' || empty($maximum_price)) {
         echo '<option value="any" selected="selected">' . __('Max Price (Any)', 'inspiry') . '</option>';
     } else {
         echo '<option value="any">' . __('Max Price (Any)', 'inspiry') . '</option>';
     }
     if (!empty($max_prices)) {
         foreach ($max_prices as $price) {
             if ($maximum_price == $price) {
                 echo '<option value="' . $price . '" selected="selected">' . Inspiry_Property::format_price($price) . '</option>';
             } else {
                 echo '<option value="' . $price . '">' . Inspiry_Property::format_price($price) . '</option>';
             }
         }
     }
 }
コード例 #5
0
<?php

global $inspiry_options;
$grid_property = new Inspiry_Property(get_the_ID());
?>
<div class="col-xs-6 col-md-4 col-grid-post">

    <article class="property-listing-grid post-for-grid hentry clearfix">

        <div class="property-thumbnail">
            <?php 
/*
 * Property Status
 */
$first_status_term = $grid_property->get_taxonomy_first_term('property-status', 'all');
if ($first_status_term) {
    ?>
                <div class="status-tag-wrapper">
                    <a href="<?php 
    echo esc_url(get_term_link($first_status_term));
    ?>
">
                        <span class="property-status-tag-flipped"><?php 
    echo esc_html($first_status_term->name);
    ?>
</span>
                    </a>
                </div>
                <?php 
}
/*
コード例 #6
0
ファイル: featured-two.php プロジェクト: Juni4567/mycashflow
    /*
     * Columns
     */
    $columns_count = intval($inspiry_options['inspiry_home_featured_columns']);
    if (!$columns_count) {
        $columns_count = 3;
    }
    $column_class = 'col-md-4';
    if (4 == $columns_count) {
        $column_class = 'col-md-3 featured-properties-4-column';
    } elseif (2 == $columns_count) {
        $column_class = 'col-md-6';
    }
    while ($featured_properties_query->have_posts()) {
        $featured_properties_query->the_post();
        $featured_property = new Inspiry_Property(get_the_ID());
        ?>
            <div class="col-xs-6 <?php 
        echo esc_attr($column_class . ' ' . inspiry_col_animation_class(@$columns_count, $properties_count) . ' ' . inspiry_animation_class());
        ?>
">

                <article class="hentry featured-property-post">

                    <div class="property-thumbnail">
                        <?php 
        inspiry_thumbnail();
        ?>
                    </div>
                    <!-- .property-thumbnail -->
コード例 #7
0
}
?>
    <div id="content-wrapper" class="site-content-wrapper site-pages">

        <div id="content" class="site-content layout-boxed">

            <div class="container">

                <div class="container-property-single clearfix">

                    <?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        global $inspiry_single_property;
        $inspiry_single_property = new Inspiry_Property(get_the_ID());
        /*
         * Property header variation one
         */
        if ($inspiry_options['inspiry_property_header_variation'] == 1) {
            ?>
                                <div class="col-lg-8 zero-horizontal-padding property-slider-wrapper">
                                    <?php 
            /*
             * Slider one
             */
            get_template_part('partials/property/single/slider');
            ?>
                                </div>

                                <div class="col-lg-4 zero-horizontal-padding property-title-wrapper">
コード例 #8
0
ファイル: properties.php プロジェクト: Juni4567/mycashflow
    $properties_count = 1;
    $gallery_enabled = $inspiry_options['inspiry_home_properties_gallery'];
    $gallery_limit = 3;
    if ($gallery_enabled) {
        $gallery_limit = intval($inspiry_options['inspiry_home_properties_gallery_limit']);
    }
    ?>
    <div class="container fade-in-up <?php 
    echo inspiry_animation_class();
    ?>
">
        <div class="row row-odd zero-horizontal-margin">
        <?php 
    while ($home_properties_query->have_posts()) {
        $home_properties_query->the_post();
        $home_property = new Inspiry_Property(get_the_ID());
        $even_odd_class = 'property-post-odd';
        if ($properties_count % 2 == 0) {
            $even_odd_class = 'property-post-even';
        }
        ?>
            <div class="col-xs-6 custom-col-xs-12">

                <article class="row hentry property-listing-home property-listing-one meta-item-half <?php 
        echo esc_attr($even_odd_class);
        ?>
">

                    <div class="property-thumbnail zero-horizontal-padding col-lg-6">
                        <?php 
        if ($gallery_enabled) {
コード例 #9
0
<?php

global $inspiry_options;
global $property_list_counter;
global $post;
$list_property = new Inspiry_Property(get_the_ID());
/*
 * Even / Odd Class
 */
$even_odd_class = 'listing-post-odd';
if ($property_list_counter % 2 == 0) {
    $even_odd_class = 'listing-post-even';
}
/*
 * Price title
 */
$price_title = __('Price', 'inspiry');
if (!empty($inspiry_options['inspiry_property_card_price_title'])) {
    $price_title = $inspiry_options['inspiry_property_card_price_title'];
}
/*
 * Description title
 */
$desc_title = __('Description', 'inspiry');
if (!empty($inspiry_options['inspiry_property_card_desc_title'])) {
    $desc_title = $inspiry_options['inspiry_property_card_desc_title'];
}
/*
 * Button Text
 */
$button_text = __('Show Details', 'inspiry');
コード例 #10
0
<?php

global $inspiry_options;
global $property_list_counter;
global $post;
$list_property = new Inspiry_Property(get_the_ID());
?>
<article class="property-listing-simple property-listing-simple-2 hentry clearfix">

    <div class="property-thumbnail col-sm-5 zero-horizontal-padding">

        <div class="price-wrapper">
            <span class="price"><?php 
$list_property->price();
?>
</span>
        </div>

        <?php 
/*
 * Display image gallery or thumbnail
 */
if ($inspiry_options['inspiry_property_card_gallery']) {
    inspiry_property_gallery($list_property->get_post_ID(), intval($inspiry_options['inspiry_property_card_gallery_limit']));
} else {
    inspiry_thumbnail();
}
?>

    </div>
    <!-- .property-thumbnail -->
コード例 #11
0
ファイル: children.php プロジェクト: Juni4567/mycashflow
$child_properties_query = new WP_Query($property_children_args);
if ($child_properties_query->have_posts()) {
    ?>
    <div class="sub-properties">
        <?php 
    global $inspiry_options;
    if (!empty($inspiry_options['inspiry_property_children_title'])) {
        ?>
<h4 class="fancy-title"><?php 
        echo esc_html($inspiry_options['inspiry_property_children_title']);
        ?>
</h4><?php 
    }
    while ($child_properties_query->have_posts()) {
        $child_properties_query->the_post();
        $child_property = new Inspiry_Property(get_the_ID());
        ?>
            <article class="property-listing-simple property-listing-simple-2 meta-item-half hentry clearfix">

                <div class="property-thumbnail col-sm-5 zero-horizontal-padding">
                    <div class="price-wrapper">
                        <span class="price"><?php 
        $child_property->price();
        ?>
</span>
                    </div>
                    <?php 
        inspiry_thumbnail('inspiry-grid-thumbnail');
        ?>
                </div>
コード例 #12
0
<?php

global $inspiry_options;
global $post;
$grid_property = new Inspiry_Property(get_the_ID());
?>
<div class="col-xs-6 col-md-4 col-grid-post">

    <article class="property-listing-grid post-for-grid hentry clearfix">

        <div class="property-thumbnail">
            <?php 
/*
 * Display image gallery or thumbnail
 */
if ($inspiry_options['inspiry_property_card_gallery']) {
    inspiry_property_gallery($grid_property->get_post_ID(), intval($inspiry_options['inspiry_property_card_gallery_limit']));
} else {
    inspiry_thumbnail();
}
?>
        </div>

        <div class="title-and-meta">
            <header class="entry-header">

                <h3 class="entry-title"><a href="<?php 
the_permalink();
?>
" rel="bookmark"><?php 
the_title();
コード例 #13
0
ファイル: featured.php プロジェクト: Juni4567/mycashflow
    $columns_count = intval($inspiry_options['inspiry_home_featured_columns']);
    if (!$columns_count) {
        $columns_count = 4;
    }
    $column_class = 'col-md-3';
    if (3 == $columns_count) {
        $column_class = 'col-md-4';
    } else {
        if (2 == $columns_count) {
            $column_class = 'col-md-6';
        }
    }
    $properties_count = 1;
    while ($featured_properties_query->have_posts()) {
        $featured_properties_query->the_post();
        $featured_property = new Inspiry_Property(get_the_ID());
        if (0 == $properties_count % 2) {
            $odd_even_class = 'featured-property-post-even';
        } else {
            $odd_even_class = 'featured-property-post-odd';
        }
        ?>
                <div class="zero-horizontal-padding col-xs-6 <?php 
        echo esc_attr($column_class . ' ' . inspiry_col_animation_class($columns_count, $properties_count) . ' ' . inspiry_animation_class());
        ?>
">

                    <article class="hentry featured-property-post <?php 
        echo esc_attr($odd_even_class);
        ?>
">
コード例 #14
0
    /**
     * Display custom column for properties
     *
     * @access  public
     * @param   string $column_name
     * @since   1.0.0
     * @return  void
     */
    public function display_custom_column($column_name)
    {
        global $post;
        switch ($column_name) {
            case 'thumb':
                if (has_post_thumbnail($post->ID)) {
                    ?>
<a href="<?php 
                    the_permalink();
                    ?>
" target="_blank"><?php 
                    the_post_thumbnail(array(130, 130));
                    ?>
</a><?php 
                } else {
                    _e('No Image', 'inspiry-real-estate');
                }
                break;
            case 'id':
                $property_id = get_post_meta($post->ID, 'REAL_HOMES_property_id', true);
                if (!empty($property_id)) {
                    echo $property_id;
                } else {
                    _e('NA', 'inspiry-real-estate');
                }
                break;
            case 'price':
                $property_price = get_post_meta($post->ID, 'REAL_HOMES_property_price', true);
                if (!empty($property_price)) {
                    $price_amount = doubleval($property_price);
                    $price_postfix = get_post_meta($post->ID, 'REAL_HOMES_property_price_postfix', true);
                    echo Inspiry_Property::format_price($price_amount, $price_postfix);
                } else {
                    _e('NA', 'inspiry-real-estate');
                }
                break;
            default:
                break;
        }
    }
コード例 #15
0
ファイル: map.php プロジェクト: Juni4567/mycashflow
    }
    $map_args = array('post_type' => 'property', 'paged' => $paged);
    // Apply Properties Filter
    $map_args = apply_filters('inspiry_properties_filter', $map_args);
    $map_args = apply_filters('inspiry_sort_properties', $map_args);
} elseif (is_tax()) {
    global $wp_query;
    /* Taxonomy Query */
    $map_args['tax_query'] = array(array('taxonomy' => $wp_query->query_vars['taxonomy'], 'field' => 'slug', 'terms' => $wp_query->query_vars['term']));
}
$map_query = new WP_Query($map_args);
$properties_data = array();
if ($map_query->have_posts()) {
    while ($map_query->have_posts()) {
        $map_query->the_post();
        $map_property = new Inspiry_Property(get_the_ID());
        $current_prop_array = array();
        // Property Title
        $current_prop_array['title'] = get_the_title();
        // Property Price
        $current_prop_array['price'] = $map_property->get_price();
        // Property Location
        $property_location = $map_property->get_location();
        if (!empty($property_location)) {
            $current_prop_array['lat'] = $map_property->get_latitude();
            $current_prop_array['lng'] = $map_property->get_longitude();
        }
        // Property Thumbnail
        if (has_post_thumbnail()) {
            $image_id = get_post_thumbnail_id();
            $image_attributes = wp_get_attachment_image_src($image_id, 'post-thumbnail');
コード例 #16
0
ファイル: my-properties.php プロジェクト: Juni4567/mycashflow
    if (!$number_of_properties) {
        $number_of_properties = 5;
    }
    $my_props_args = array('post_type' => 'property', 'posts_per_page' => $number_of_properties, 'paged' => $paged, 'post_status' => array('pending', 'draft', 'publish', 'future'), 'author' => $current_user->ID);
    $my_properties_query = new WP_Query(apply_filters('inspiry_my_properties', $my_props_args));
    if ($my_properties_query->have_posts()) {
        // Get payment related options
        $paypal_payment_enabled = $inspiry_options['inspiry_payment_via_paypal'];
        $paypal_ipn_url = $inspiry_options['inspiry_paypal_ipn_url'];
        $paypal_merchant_id = $inspiry_options['inspiry_paypal_merchant_id'];
        $paypal_sandbox = $inspiry_options['inspiry_paypal_sandbox'];
        $paypal_payment_amount = $inspiry_options['inspiry_paypal_payment_amount'];
        $paypal_currency_code = $inspiry_options['inspiry_paypal_currency_code'];
        while ($my_properties_query->have_posts()) {
            $my_properties_query->the_post();
            $my_property = new Inspiry_Property(get_the_ID());
            ?>
                                        <article class="user-submit-property meta-item-half hentry clearfix">

                                            <div class="property-thumbnail col-xs-3 col-lg-2">
                                                <?php 
            inspiry_thumbnail();
            ?>
                                            </div>

                                            <div class="content-wrapper col-xs-9 col-lg-10">

                                                <div class="title-and-meta">

                                                    <header class="entry-header">
                                                        <h3 class="entry-title">
コード例 #17
0
        function widget($args, $instance)
        {
            extract($args);
            $title = apply_filters('widget_title', $instance['title']);
            if (empty($title)) {
                $title = false;
            }
            // number of properties
            $count = intval($instance['count']);
            if (!$count || $count < 1) {
                $count = 2;
            }
            $sort_by = $instance['sort_by'];
            $featured_args = array('post_type' => 'property', 'posts_per_page' => $count, 'meta_query' => array(array('key' => 'REAL_HOMES_featured', 'value' => 1, 'compare' => '=', 'type' => 'NUMERIC')));
            //Order by
            if ($sort_by == "random") {
                $featured_args['orderby'] = "rand";
            } else {
                $featured_args['orderby'] = "date";
            }
            $featured_query = new WP_Query($featured_args);
            echo $before_widget;
            if ($title) {
                echo $before_title;
                echo esc_html($title);
                echo $after_title;
            }
            if ($featured_query->have_posts()) {
                ?>
                <ul class="widget-featured-properties">
                    <?php 
                while ($featured_query->have_posts()) {
                    $featured_query->the_post();
                    $featured_property = new Inspiry_Property(get_the_ID());
                    ?>
                        <li>
                            <figure class="featured-properties-thumbnail">
                                <span class="price"><?php 
                    $featured_property->price();
                    ?>
</span>
                                <?php 
                    inspiry_thumbnail('post-thumbnail');
                    ?>
                            </figure>
                            <h4 class="featured-properties-title">
                                <a href="<?php 
                    the_permalink();
                    ?>
"><?php 
                    the_title();
                    ?>
</a>
                            </h4>
                            <p><?php 
                    inspiry_excerpt(12);
                    ?>
 <a href="<?php 
                    the_permalink();
                    ?>
" class="read-more-link"><?php 
                    _e('Know More', 'inspiry');
                    ?>
</a></p>
                        </li>
                        <?php 
                }
                ?>
                </ul>
                <?php 
            } else {
                ?>
                <ul class="widget-featured-properties">
                    <?php 
                echo '<li>';
                _e('No featured property found!', 'inspiry');
                echo '</li>';
                ?>
                </ul>
                <?php 
            }
            wp_reset_postdata();
            echo $after_widget;
        }