Woocommerce Featured Products Paging
-
Hi All,
Hope someone can help me with this.
On the home page of my site I want to show a list of featured products from the catalog.So far I have this:
<div id="content" role="main"> <ul class="products"> <?php /*$paged = (get_query_var('page')) ? get_query_var('page') : 1;*/ ?> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?> <?php $args = array( 'post_type' => 'product', 'meta_key' => '_featured', 'meta_value' => 'yes', 'posts_per_page' => 8, 'paged' => $paged); ?> <?php $my_query = new wp_query( $args ); ?> <?php if ( $my_query->have_posts() ) { while ( $my_query->have_posts() ) : $my_query->the_post(); woocommerce_get_template_part( 'content', 'product' ); endwhile; } else { echo __( 'No products found' ); } ?> </ul><!--/.products--> </div><!-- #content -->
This does display a list of the featured products but no paging shows up.
Can anyone tell me where I am going wrong.
Thanks in advance
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Woocommerce Featured Products Paging’ is closed to new replies.