如题:
代码如下:
1 |
<p>add_filter('pre_get_posts','wbox_store_showposts_num');<br>function wbox_store_showposts_num($query) {<br> if( get_query_var('post_type') == 'store'){//store替换成你的文章类型<br> $query->set('posts_per_page',20); //20替换成你想要的显示数量<br> }<br> return $query;<br>}</p> |