Paged not working
-
Hi
Have som problems to get the paged function to work. i can make the site change to page 2 but the products stay on page 1.
I have tryed static value like 2 on the args paged.
I can’t see where the problems is. here is some code i use:$term = get_queried_object(); global $wp_query; $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1; <strong>tryed just "page" on get_query_var</strong> $args = array( 'facetwp' => true, 'post_type' => 'product', 'posts_per_page' => get_option( 'posts_per_page' ), 'paged' => $paged, 'tax_query' => array('taxonomy', 'product_cat', 'field' => 'slug', 'terms' => $term->slug), 'product_tag' => $teen_kids_adult); $wp_query = new WP_Query( $args ); if ( $wp_query->have_posts() ) { while ( $wp_query->have_posts() ) : $wp_query->the_post(); wc_get_template_part( 'content', 'product' ); endwhile; }
It is on a /**
* Template Name: product page template
*/Please help i don’t see the problem
I have tryed to get it to work in long time now.Best regards
MortenThe page I need help with: [log in to see the link]
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Paged not working’ is closed to new replies.