1
<?php
/**
* Template Name: Blog page
* Description: The blog page
*/
get_header(); ?>
<?php
$args = array('numberposts' => 3);
$lastposts = get_posts($args);
foreach($lastposts as $post) : setup_postdata($post); ?>
<div class="postblog">
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<span class="postdetails">
<?php the_time ('j F, Y'); ?> <span class="bullet">•</span> Posted in: <?php the_category(', '); ?>
</span>
<?php the_content(); ?>
<div class="fb">
<?php if(function_exists("wpfblike")) echo wpfblike(); ?>
</div>
</div>
<?php endforeach; ?>
</div>
<?php get_footer(); ?>
每当我尝试使用WP_Paginate或Pagenavi与此,它拒绝显示,无论我尝试使用我无法获得页面导航。我有5个帖子,只有三个正在显示(根据上面的代码),所以我怎样才能到另外两个?为什么页面导航不起作用?
这确实有用,但是我怎么得不到这些插件? – user1100887 2011-12-30 04:33:02
你使用哪个wordpress版本? – Cyclonecode 2011-12-30 04:38:32
最新的,3.3 – user1100887 2011-12-30 04:44:41