由於某種原因,此查詢僅返回最近發佈的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