修复分页问题:
$paged = (get_query_var(\'paged\')) ? get_query_var(\'paged\') : 1;
要添加自定义帖子类型的查询:
query_posts( array(
\'post_type\' => array(
\'post\',
\'custom_post_type_name\'
),
\'paged\' => $paged )
);
启动主回路
if (have_posts()) :
while (have_posts()) : the_post();
//Post content
endwhile;
endif;
?>