0) $query_args['tax_query'] = array( array( 'taxonomy' => 'taxonomy_portfolio', 'field' => 'id', 'terms' => $portfolio_categories_array ) ); $wp_query = new WP_Query($query_args); do_action('pk_before_portfolio'); do_action('pk_portfolio_categories'); if (have_posts() && $columns == 1) : while (have_posts()) : the_post(); if ($columns > 1) : get_template_part('format', 'grid-item'); else : $post_meta = get_post_custom(get_the_ID()); get_template_part('format', 'blog-'.str_replace(array('gallery', 'slider'), array('image', 'gallery'), ((isset($post_meta['_work_format'][0])) ? $post_meta['_work_format'][0] : 'standard'))); endif; endwhile; elseif (have_posts() && $columns > 1 && $grid == 'normal') : $c = 0; while (have_posts()) : $c++; the_post(); ?>