'', 'posts_query' => '', 'display_title' => '', 'display_author' => '', 'display_post_date' => '', 'display_taxonomy' => '', 'display_summary' => '', 'image_linkable' => '', 'post_link_new_window' => '', 'filterable' => '', 'post_type' => 'post', 'taxonomy_filter' => 'category', 'per_line' => 3, 'per_line_tablet' => 2, 'per_line_mobile' => 1, 'layout_mode' => 'fitRows', 'image_size' => 'large', 'packed' => '', 'gutter' => 20, 'tablet_gutter' => 10, 'tablet_width' => 800, 'mobile_gutter' => 10, 'mobile_width' => 480 ) ); $settings = shortcode_atts($defaults, $atts); $current_page = get_queried_object_id(); $posts_query = $settings['posts_query']; if (is_array($posts_query)) { $posts_query['post_status'] = 'publish'; } else { $posts_query .= '|post_status:publish'; } if (function_exists('vc_build_loop_query')) { $posts_query = apply_filters('lvca_posts_grid_posts_query', $posts_query, $settings); list($query_args, $loop) = vc_build_loop_query($posts_query); } else { $query_args = array('posts_per_page' => 8, 'post_type' => $settings['post_type']); $query_args = apply_filters('lvca_posts_grid_query_args', $query_args, $settings); // just display first 10 portfolio items if the user came directly to this shortcode $loop = new WP_Query($query_args); } $output = ''; // Loop through the posts and do something with them. if ($loop->have_posts()) : // Check if any taxonomy filter has been applied list($chosen_terms, $taxonomies) = lvca_get_chosen_terms($query_args); if (empty($chosen_terms)) $taxonomies[] = $settings['taxonomy_filter']; $output .= '