Example #1
0
        the_post_thumbnail('slider-image');
    }
    ?>

				<div class="intro-overlay wow fadeIn" data-wow-duration="1s" data-wow-delay="0.2s">
					<div class="row">
						<div class="columns small-12 large-12">
							<h1 class="wow fadeIn" data-wow-duration="1s" data-wow-delay="1s"><?php 
    the_title();
    ?>
</h1>

							<div class="article-intro-meta">
								<p class="wow fadeIn" data-wow-duration="1s" data-wow-delay="1.75s">
									<i class="<?php 
    echo esc_attr(wplook_postformat_icon(get_post_format()));
    ?>
"></i>

									<?php 
    if (ot_get_option('wpl_date_single_post') == "on") {
        ?>
											<span class="date" itemprop="startDate">
												<?php 
        the_date(get_option('date_format'));
        ?>
											</span>
										<?php 
    }
    ?>
										<?php 
Example #2
0
    public function widget($args, $instance)
    {
        global $post;
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance);
        $subtitle = apply_filters('widget_title', empty($instance['subtitle']) ? '' : $instance['subtitle'], $instance);
        $nr_posts = isset($instance['nr_posts']) ? esc_attr($instance['nr_posts']) : '';
        $display_type = isset($instance['display_type']) ? esc_attr($instance['display_type']) : '';
        // WP_Query arguments
        $args = array('post_type' => 'post', 'post_status' => 'publish', 'pagination' => false, 'posts_per_page' => $nr_posts, 'orderby' => $display_type);
        // The Query
        $the_query = null;
        $the_query = new WP_Query($args);
        ?>

			<section class="section-carousel wow fadeIn" data-wow-duration="0.5s" data-wow-delay="0.4s">
				<div class="row">
					<header class="section-head" itemprop="name">
						<h5><?php 
        echo esc_html($subtitle);
        ?>
</h5>
						<h2><?php 
        echo esc_html($title);
        ?>
</h2>
					</header><!-- /.section-head -->
					<div class="section-body">
						<div class="latest-posts owl-carousel">

							<?php 
        if ($the_query->have_posts()) {
            while ($the_query->have_posts()) {
                $the_query->the_post();
                ?>

								<div class="latest-post" itemscope itemtype="https://schema.org/BlogPosting">
									<a href="<?php 
                the_permalink();
                ?>
" class="latest-post-link" itemprop="url">
										<?php 
                if (has_post_thumbnail()) {
                    the_post_thumbnail('medium-thumb');
                } else {
                    echo '<img src="' . get_template_directory_uri() . '/assets/images/medium-thumb.png">';
                }
                ?>

										<i class="<?php 
                echo esc_attr(wplook_postformat_icon(get_post_format()));
                ?>
"></i>
										<div class="latest-post-overlay">
											<div class="latest-post-inner">
												<span class="btn btn-more"><?php 
                _e('Read more', 'charity-life-wpl');
                ?>
</span>

												<h5 itemprop="name"><?php 
                the_title();
                ?>
</h5>

												<h6 itemprop="startDate"><?php 
                the_date(get_option('date_format'));
                ?>
</h6>
											</div><!-- /.latest-post-inner -->
										</div><!-- /.latest-post-overlay -->
									</a>
								</div><!-- /.latest-post -->

								<?php 
            }
            ?>
							<?php 
        }
        ?>
							<?php 
        wp_reset_postdata();
        ?>
						</div><!-- /.causes-list owl-carousel -->
					</div><!-- /.section-body -->
				</div><!-- /.row -->
			</section><!-- /.section-carousel <?php 
        echo esc_attr($this->id);
        ?>
 -->
		<?php 
    }