2
Phân trang khi sử dụng wp_query?
<!-- query --> <?php $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; $query = new WP_Query( array( 'category_name' => 'investor-news', 'posts_per_page' => 2, 'paged' => $paged ) ); ?> <?php if ( $query->have_posts() ) : ?> <!-- begin loop --> <?php while ( $query->have_posts() ) …