我正在使用 wordpress 3.4=5,我使用代码来获取帖子,但分页不适用于此,请帮助
$posts = get_posts('category='.$subcatid.'&orderby=rand&numberposts=4');
foreach($posts as $post) { ?>
<h2>
<a href="<?php the_permalink() ?>" target="_parent"><?php the_title(); ?></a>
</h2>
<p><?php //echo $post->post_content; ?></p>
<p><?php echo get_post_meta($post->ID, 'Address', true); ?></p>
<hr style="margin-left:0px; margin-right:0px; margin-bottom:15px; margin-top:15px;" />
<?php } ?>