Nie działa paginacja
-
Mam taki kod
//I will use WP_Query class instance $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array( 'posts_per_page' => 2, 'cat' => '863', 'paged' => $paged); //Set up a counter $counter = 0; //Preparing the Loop $query = new WP_Query( $args ); //In while loop counter increments by one $counter++ if( $query->have_posts() ) : while( $query->have_posts() ) : $query->the_post(); $counter++; //We are in loop so we can check if counter is odd or even if( $counter % 2 == 0 ) : //It's even the_title(); //Echo the title of post else: //It's odd the_title(); endif; endwhile; wp_reset_postdata(); pagination(); endif;
nie działa mi paginacja
umieszczałem pagination(); w rożnych miejscach z mizernym skutkiem.co zrobiłem źle?
- Temat ‘Nie działa paginacja’ jest zamknięty na nowe odpowiedzi.