这可能很容易,但我无法弄清楚。我已经搜索了几个小时,但我的情况没有运气。我需要使用 my_query 进行分页
<?php
$count = 0;
$id_suffix = 1;
$items_per_row = 4;
$quality = 90;
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$wp_query = new WP_Query( array( 'posts_per_page' => '4', 'post_type' => 'portfolio') );
$grid_class = 'grid_3';
$desired_width = 220;
$desired_height = 190;
$terms = get_terms( 'portfolio_categories' );
$count_terms = count( $terms );
?>
//some php code
<?php while ( $wp_query -> have_posts()) : $wp_query -> the_post(); //query the "portfolio" custom post type for portfolio items ?>
//some more php code
<?php endwhile;?>
<div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'thematic')) ?></div>
<div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'thematic')) ?></div>
</ul>
我要显示分页,但是当单击另一个页面时,它会显示相同的投资组合项目。任何帮助,将不胜感激。
我得到了使用 wp-pagenavi 显示的分页,但同样的问题是不更改项目。