'
. '
'
: '')
;
if (lorem_ipsum_books_media_store_get_template_property($style, 'need_isotope')) {
if (!lorem_ipsum_books_media_store_param_is_off($filters))
$output .= '
';
if ($columns<1) $columns = lorem_ipsum_books_media_store_substr($style, -1);
$output .= '
';
}
$args = array(
'post_status' => current_user_can('read_private_pages') && current_user_can('read_private_posts') ? array('publish', 'private') : 'publish',
'posts_per_page' => $count,
'ignore_sticky_posts' => true,
'order' => $order=='asc' ? 'asc' : 'desc',
'orderby' => 'date',
);
if ($offset > 0 && empty($ids)) {
$args['offset'] = $offset;
}
$args = lorem_ipsum_books_media_store_query_add_sort_order($args, $orderby, $order);
if (!lorem_ipsum_books_media_store_param_is_off($only)) $args = lorem_ipsum_books_media_store_query_add_filters($args, $only);
$args = lorem_ipsum_books_media_store_query_add_posts_and_cats($args, $ids, $post_type, $cat);
$query = new WP_Query( $args );
$flt_ids = array();
while ( $query->have_posts() ) { $query->the_post();
lorem_ipsum_books_media_store_storage_inc('sc_blogger_counter');
$args = array(
'layout' => $style,
'show' => false,
'number' => lorem_ipsum_books_media_store_storage_get('sc_blogger_counter'),
'add_view_more' => false,
'posts_on_page' => ($count > 0 ? $count : $query->found_posts),
// Additional options to layout generator
"location" => $location,
"descr" => $descr,
"readmore" => $readmore,
"loadmore" => $loadmore,
"reviews" => lorem_ipsum_books_media_store_param_is_on($rating),
"dir" => $dir,
"scroll" => lorem_ipsum_books_media_store_param_is_on($scroll),
"info" => lorem_ipsum_books_media_store_param_is_on($info),
"links" => lorem_ipsum_books_media_store_param_is_on($links),
"orderby" => $orderby,
"columns_count" => $columns,
"date_format" => $date_format,
// Get post data
'strip_teaser' => false,
'content' => lorem_ipsum_books_media_store_get_template_property($style, 'need_content'),
'terms_list' => !lorem_ipsum_books_media_store_param_is_off($filters) || lorem_ipsum_books_media_store_get_template_property($style, 'need_terms'),
'filters' => lorem_ipsum_books_media_store_param_is_off($filters) ? '' : $filters,
'hover' => $hover,
'hover_dir' => $hover_dir
);
$post_data = lorem_ipsum_books_media_store_get_post_data($args);
$output .= lorem_ipsum_books_media_store_show_post_layout($args, $post_data);
if (!lorem_ipsum_books_media_store_param_is_off($filters)) {
if ($filters == 'tags') { // Use tags as filter items
if (!empty($post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms) && is_array($post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms)) {
foreach ($post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms as $tag) {
$flt_ids[$tag->term_id] = $tag->name;
}
}
}
}
}
wp_reset_postdata();
// Close isotope wrapper
if (lorem_ipsum_books_media_store_get_template_property($style, 'need_isotope'))
$output .= '
';
// Isotope filters list
if (!lorem_ipsum_books_media_store_param_is_off($filters)) {
$filters_list = '';
if ($filters == 'categories') { // Use categories as filter items
$taxonomy = lorem_ipsum_books_media_store_get_taxonomy_categories_by_post_type($post_type);
$portfolio_parent = $cat ? max(0, lorem_ipsum_books_media_store_get_parent_taxonomy_by_property($cat, 'show_filters', 'yes', true, $taxonomy)) : 0;
$args2 = array(
'type' => $post_type,
'child_of' => $portfolio_parent,
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => 1,
'hierarchical' => 0,
'exclude' => '',
'include' => '',
'number' => '',
'taxonomy' => $taxonomy,
'pad_counts' => false
);
$portfolio_list = get_categories($args2);
if (is_array($portfolio_list) && count($portfolio_list) > 0) {
$filters_list .= '
'.esc_html__('All', 'trx_utils').'';
foreach ($portfolio_list as $cat) {
$filters_list .= '
'.($cat->name).'';
}
}
} else { // Use tags as filter items
if (is_array($flt_ids) && count($flt_ids) > 0) {
$filters_list .= '
'.esc_html__('All', 'trx_utils').'';
foreach ($flt_ids as $flt_id=>$flt_name) {
$filters_list .= '
'.($flt_name).'';
}
}
}
if ($filters_list) {
lorem_ipsum_books_media_store_storage_concat('js_code', '
jQuery("#'.esc_attr($id).' .isotope_filters").append("'.addslashes($filters_list).'");
');
}
}
$output .= (lorem_ipsum_books_media_store_param_is_on($scroll)
? '