Slider Revolution WP
09.06.2016
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<?php $ids = array(); $cat = get_query_var('product_cat'); $args = array( 'post_type' => 'product', 'product_cat' => $cat ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); global $product; $ids[] = $loop->post->ID; endwhile; wp_reset_query(); // replace "my-grid" with the alias name from one of your grids echo do_shortcode('[ess_grid alias="my-grid" posts="'.implode(',', $ids).'"]'); ?> |