Esempio n. 1
0
                            the_time('F d, Y');
                            ?>
 </span>
                                                <span class="category"><?php 
                            _e('in', 'framework');
                            ?>
 <?php 
                            the_category(', ');
                            ?>
</span>
                                            </div><!-- end of post meta -->
                                        </header>
                                        <?php 
                            get_template_part("post-formats/grid/{$format}");
                            echo '<p>';
                            inspiry_excerpt(18);
                            ?>
<a href="<?php 
                            the_permalink();
                            ?>
" class="read-more"><?php 
                            _e('Read More', 'framework');
                            ?>
</a><?php 
                            echo '</p>';
                            ?>
                                    </article>


                                    </div><?php 
                            $post_count++;
<article <?php 
post_class('clearfix');
?>
>
    <header>
        <h2 class="post-title"><a href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a></h2>
    </header>
    <?php 
get_template_part("post-formats/standard");
echo '<p>';
inspiry_excerpt(70);
echo '</p>';
?>
    <a href="<?php 
the_permalink();
?>
" class="pp-btn"><?php 
_e('Read More', 'framework');
?>
</a>
</article>
Esempio n. 3
0
        ?>
"><?php 
        the_title();
        ?>
</a>
                                        </h4>
                                        <div class="post-meta entry-meta">
                                            <span class="author-link"><?php 
        printf(_x('By %s', 'author byline', 'inspiry'), sprintf('<a rel="author" href="%1$s">%2$s</a>', esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_html(get_the_author_meta('display_name'))));
        ?>
</span>
                                        </div>
                                    </div>

                                    <p><?php 
        inspiry_excerpt(13);
        ?>
</p>

                                    <?php 
        if (!empty($inspiry_options['inspiry_home_news_link_text'])) {
            ?>
                                        <a class="read-more" href="<?php 
            the_permalink();
            ?>
"><?php 
            echo esc_html($inspiry_options['inspiry_home_news_link_text']);
            ?>
 <i class="fa fa-arrow-circle-o-right"></i></a>
                                        <?php 
        }
Esempio n. 4
0
?>
            <span class="date"> <?php 
_e('on', 'framework');
?>
 <?php 
the_time('F d, Y');
?>
 </span>
            <span class="category"><?php 
_e('in', 'framework');
?>
 <?php 
the_category(', ');
?>
</span>
        </div><!-- end of post meta -->
    </header>
    <?php 
get_template_part("post-formats/{$format}");
echo '<p>';
inspiry_excerpt(50);
echo '</p>';
?>
    <a href="<?php 
the_permalink();
?>
" class="pp-btn"><?php 
_e('Read More', 'framework');
?>
</a>
</article>
        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;
        }