// Enable Isotope? if ('true' == $filter || 'masonry' == $grid_style) { $is_isotope = true; $equal_heights_grid = false; } // No need for masonry if not enough columns and filter is disabled if ('true' != $filter && 'masonry' == $grid_style) { $post_count = count($wpex_query->posts); if ($post_count <= $columns) { $is_isotope = false; } } // Filter categories if ('true' == $filter && taxonomy_exists($atts['taxonomy'])) { // Get filter terms $filter_terms = get_terms($atts['taxonomy'], vcex_grid_filter_args($atts, $wpex_query)); $filter_terms_ids = wp_list_pluck($filter_terms, 'term_id'); // Check if filter active cat exists on current page $filter_has_active_cat = in_array($filter_active_category, $filter_terms_ids) ? 'test' : false; // Set filter to false if there aren't any terms if (!$filter_terms) { $filter = false; } } // Content style $content_style = vcex_inline_style(array('background' => $content_background, 'padding' => $content_padding, 'margin' => $content_margin, 'color' => $content_color, 'opacity' => $content_opacity, 'text_align' => $content_alignment, 'border' => $content_border)); // Heading style if ('true' == $title) { $heading_style = vcex_inline_style(array('margin' => $content_heading_margin, 'color' => $content_heading_color, 'font_size' => $content_heading_size, 'font_weight' => $content_heading_weight, 'line_height' => $content_heading_line_height, 'text_transform' => $content_heading_transform)); $heading_link_style = vcex_inline_style(array('color' => $content_heading_color)); }
<li class="active"><a href="#" data-filter="*" class="<?php echo $filter_button_classes; ?> "><span><?php echo $all_text; ?> </span></a></li> <?php // Taxonomy style filter if ('taxonomy' == $filter_type) { // If taxonony exists get terms if (taxonomy_exists($filter_taxonomy)) { // Get filter args $atts['taxonomy'] = $filter_taxonomy; $args = vcex_grid_filter_args($atts, $wpex_query); $terms = get_terms($filter_taxonomy, $args); // Display filter if (!empty($terms)) { ?> <?php foreach ($terms as $term) { ?> <li class="filter-cat-<?php echo $term->term_id; ?> "><a href="#" data-filter=".cat-<?php echo $term->term_id; ?> " class="<?php