function compare_blogs_func($atts, $content) { extract(shortcode_atts(array('title' => '', 'items' => '10', 'visible_items' => '2', 'blogs_orderby' => 'date', 'blogs_order' => 'DESC'), $atts)); $html = '<div class="white-title clearfix"> <div class="white-block-border clearfix"> <div class="pull-left"> ' . compare_get_white_title_icon() . ' ' . (!empty($title) ? '<h3>' . $title . '</h3>' : '') . ' </div> <div class="pull-right"> <a href="javascript:;" class="list-left"> <i class="fa fa-angle-left"></i> </a> <a href="javascript:;" class="list-right"> <i class="fa fa-angle-right"></i> </a> </div> </div> </div>'; $blogs = new WP_Query(array('post_type' => 'post', 'ignore_sticky_posts' => true, 'posts_per_page' => $items, 'post_status' => 'publish', 'orderby' => $blogs_orderby, 'order' => $blogs_order)); if ($blogs->have_posts()) { $html .= '<div class="blogs-slider" data-visible_items="' . esc_attr($visible_items) . '">'; while ($blogs->have_posts()) { $blogs->the_post(); $has_media = compare_has_media(); ob_start(); include get_template_directory() . '/includes/blog-box.php'; $html .= ob_get_contents(); ob_end_clean(); } $html .= '</div>'; } wp_reset_postdata(); return '<div class="owl-parent shortcode shortcode-blogs">' . $html . '</div>'; }
<?php $post_format = get_post_format(); if ($post_format == 'quote' && compare_has_media()) { ?> <div <?php post_class('white-block clearfix'); ?> > <?php if (has_post_thumbnail()) { the_post_thumbnail('compare-quote-box'); } else { echo '<img src="' . esc_url(get_template_directory_uri() . '/images/product-placeholder.jpg') . '">'; } include get_template_directory() . '/media/media' . (!empty($post_format) ? '-' . $post_format : '') . '.php'; ?> </div> <?php } else { ?> <div <?php post_class('white-block clearfix'); ?> > <?php if ($has_media) { ?> <div class="white-block-media"> <?php
==================*/ get_header(); the_post(); $post_pages = compare_link_pages(); ?> <section> <div class="container"> <div class="row"> <div class="col-sm-<?php echo is_active_sidebar('sidebar-blog') ? '9' : '12'; ?> "> <div class="white-block"> <?php if (compare_has_media()) { ?> <div class="white-block-media"> <?php $image_size = 'post-thumbnail'; $post_format = get_post_format(); include get_template_directory() . '/media/media' . (!empty($post_format) ? '-' . $post_format : '') . '.php'; ?> </div> <?php } ?> <div class="white-block-content blog-item-content"> <p class="blog-meta"> <?php the_time('m/d/Y');
$pagination = compare_format_pagination($page_links); $counter = 0; ?> <section> <div class="container"> <div class="row"> <div class="col-md-<?php echo is_active_sidebar('sidebar-blog') ? '9' : '12'; ?> "> <div class="row"> <?php if (have_posts()) { while (have_posts()) { the_post(); $has_media = compare_has_media(); if ($counter == 2) { echo '</div><div class="row">'; $counter = 0; } $counter++; echo '<div class="col-md-6">'; include get_template_directory() . '/includes/blog-box.php'; echo '</div>'; } } else { ?> <div class="white-block"> <div class="white-block-content"> <?php _e('No results found', 'compare');