我创建了一个带有参数的查询,请参见blow。在页面上,我看到循环中有一个错误
请注意未定义的偏移量1
请注意未定义的偏移量2
请注意未定义的偏移量3等。。。
$args = array (
\'post_type\' => \'catalog\',
\'post_status\' => \'publish\',
);
$loop = new WP_Query( $args );
if ( $loop->have_posts() ) {
while ( $loop->have_posts() ) {
the_post();
echo get_the_title();
}
}
我尝试了其他论点,但这不起作用。“每页帖子”=>;请问谁能帮我?