我有下面的代码,但它出现在更多的链接无法正常工作,请会有人头脑帮助,我已经激活功能文件摘录:摘录发表在WordPress的帖子
查询后下: -
<?php $the_query = new WP_Query('showposts=5'); ?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
<?php the_excerpt('Read more...'); ?>
<a href="<?php echo get_permalink(); ?>"> Read More...</a>
<?php endwhile;?>
嗨,那里,我做了这个,它不工作,因此我认为这是我的PHP代码 – 2013-03-03 13:36:06
我更新了与PHP代码的答案。 – birgire 2013-03-03 13:43:18
你能解释一下'read the link is not working'是什么意思吗?你的意思是你的代码中'the_excerpt'函数之后的链接。 Ps:你应该使用'posts_per_page'而不是旧的'showposts'参数。 – birgire 2013-03-03 14:08:18