Viewing File: /home/maglabs/valvtec1/wp-content/themes/indobi/inc/sections/blog.php
<?php
$data = indobi_el()->merge_options([
'sub_heading' => '',
'text-heading' => '',
'button_text' => '',
'button_url' => '',
'infinite_scroll' => false,
'posts_per_page' => 9,
'category' => [],
'include' => [],
'paged' => 1,
'query' => false,
], $data);
$args = [
'paged' => $data['paged'],
'posts_per_page' => $data['posts_per_page'],
];
// Filter by category.
if ($data['category']) $args['category__in'] = $data['category'];
// Only display the selected listings.
if ($data['include']) $args['post__in'] = $data['include'];
// WP Query.
$query = $data['query'] ? : new WP_Query($args);
?>
<!-- blog-area -->
<section id="blog" class="blog-area p-relative fix pt-90 pb-90">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-12">
<div class="section-title center-align mb-50 text-center wow fadeInDown animated" data-animation="fadeInDown" data-delay=".4s">
<h2>
<?php echo html_entity_decode($data['text_heading'])?>
</h2>
</div>
</div>
</div>
<div class="row">
<?php if ($query->have_posts()): ?>
<?php while ($query->have_posts()): $query->the_post();
if (get_post_type() == 'indobi') {
global $post;
$post->indobi_options__wrap_in = 'col-md-4 col-sm-6 col-xs-12 reveal';
get_template_part( 'content','indobi' );
} else {
indobi_el()->get_partial('post-preview', [
'wrap_in' => [],
]);
}
endwhile; ?>
<?php wp_reset_postdata() ?>
<?php endif ?>
</div>
</div>
</section>
<!-- blog-area-end -->
Back to Directory
File Manager