由于某种原因,此查询仅返回最近发布的10个结果,应该至少有15个结果。所以我的问题是,如果我没有在我的查询中指定结果的数量,WordPress会默认为10或者什么?WordPress默认返回结果数量
<?php getGallery('test', 'test2'); ?>
function getGallery($galleryLink, $altLink){
global $post;
// search for any pages with a custom field of 'test'
query_posts('meta_key='.$galleryLink.'&post_type=page');
if (have_posts()) while (have_posts()) : the_post();
$link = get_post_meta($post->ID, $galleryLink, true);
$alt = get_post_meta($post->ID, $altLink, true);
$permalink = get_permalink($id);?>
<a href='<?php echo $permalink ?>'><img src="<?php echo $link ?>" alt="<?php echo $alt ?>"/></a>
<?php endwhile;
wp_reset_query();
}
辉煌 - 这就是我需要知道的;如何覆盖用户设置。非常感谢您在仪表板中指出这一点,我不知道您可以设置它。 – SparrwHawk 2012-02-17 16:19:29