dontfear 762 Posted June 28, 2015 Report Share Posted June 28, 2015 Всего 160 постов, выводятся по 20 с помощью WP_Query <? $args = array( 'posts_per_page' => 20, 'cat' => 5,);?> <? $query = new WP_Query( $args );?> <? while ( $query->have_posts() ) {?> <? $query->the_post();?> <div><?php the_time('d.m.Y'); ?> <a href="<?php the_permalink(); ?>"><? the_title(); ?></a> </div> <? }?> <? wp_reset_postdata(); ?> Как вывести пагинацию? Link to post Share on other sites
WQP 360 Posted June 28, 2015 Report Share Posted June 28, 2015 Вот тут вроде есть решение вашей проблемы http://stackoverflow.com/questions/14115778/pagination-in-wp-query А так гуглите wp_query pagination. Этим вопросом много кто задавался dontfear 1 Link to post Share on other sites
gefard 89 Posted June 28, 2015 Report Share Posted June 28, 2015 Всего 160 постов, выводятся по 20 с помощью WP_Query <? $args = array( 'posts_per_page' => 20, 'cat' => 5,);?> <? $query = new WP_Query( $args );?> <? while ( $query->have_posts() ) {?> <? $query->the_post();?> <div><?php the_time('d.m.Y'); ?> <a href="<?php the_permalink(); ?>"><? the_title(); ?></a> </div> <? }?> <? wp_reset_postdata(); ?> Как вывести пагинацию? как то ручками array( 'posts_per_page' => 20, 'cat' => 5, 'paged' => 2); Link to post Share on other sites
dontfear 762 Posted June 28, 2015 Author Report Share Posted June 28, 2015 А так гуглите wp_query pagination. Этим вопросом много кто задавался Вопрос решен, спасибо. Link to post Share on other sites
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now