Example #1
0
        // 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">
                                                            <a href="<?php 
            the_permalink();
            ?>
" rel="bookmark"><?php 
            the_title();
            ?>
</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();
        ?>
" rel="bookmark"><?php 
        the_title();
        ?>
</a></h3>
                                <div class="price-and-status">
                                    <span class="price"><?php 
Example #3
0
    }
    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>

                <div class="title-and-meta col-sm-7">
                    <header class="entry-header">
                        <h3 class="entry-title"><a href="<?php 
        the_permalink();
        ?>
" rel="bookmark"><?php 
        the_title();
        ?>
</a></h3>
                    </header>
                    <?php 
        inspiry_property_meta($child_property, array('exclude' => array('id')));
 /**
  * Generated gallery for a property
  * @param int $property_id
  * @param int $gallery_limit
  */
 function inspiry_property_gallery($property_id = 0, $gallery_limit = 3)
 {
     if (!$property_id) {
         $property_id = get_the_ID();
     }
     $gallery_images = inspiry_get_post_meta('REAL_HOMES_property_images', array('type' => 'image_advanced', 'size' => 'inspiry-grid-thumbnail'), $property_id);
     if (!empty($gallery_images) && 0 < count($gallery_images)) {
         ?>
         <div class="gallery-slider-two flexslider">
             <ul class="slides">
                 <?php 
         $gallery_image_count = 1;
         foreach ($gallery_images as $gallery_image) {
             $caption = !empty($gallery_image['caption']) ? $gallery_image['caption'] : $gallery_image['alt'];
             echo '<li>';
             echo '<a class="swipebox" data-rel="gallery-' . $property_id . '" href="' . esc_url($gallery_image['full_url']) . '" title="' . $caption . '" >';
             echo '<img class="img-responsive" src="' . esc_url($gallery_image['url']) . '" alt="' . $gallery_image['title'] . '" />';
             echo '</a>';
             echo '</li>';
             if ($gallery_image_count == $gallery_limit) {
                 break;
             }
             $gallery_image_count++;
         }
         ?>
             </ul>
         </div>
         <?php 
     } else {
         inspiry_thumbnail();
     }
 }
        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;
        }