您可以随时添加:
\'posts_per_page\'=-1
<?php query_posts(\'posts_per_page=-1&post_type=faq&post_status=publish&order=DESC&orderby=date=\' ) ?>
<?php if( have_posts() ): ?>
<ul id="myUL" class="margb-40">
<?php while( have_posts() ): the_post(); ?>
如果不起作用,请将其放入数组中:
<?php query_posts( array(
\'category_name\' => \'my-category-slug\',
\'posts_per_page\' => -1,
\'post_type\' => \'faq\',
\'post_status\'=> \'publish\',
\'order\'=> \'DESC\',
\'orderby\'=> \'date\',
) );
?>
<?php if( have_posts() ): ?>
<ul id="myUL" class="margb-40">
<?php while( have_posts() ): the_post(); ?>
最后,尝试将posts\\u per\\u page更改为numberposts。