我正在修改一个开箱即用WordPress的主题。我正在尝试做一些相当简单的事情,在主页上添加一个后期查询。只有查询才会返回包含所有内容的链接。WordPress的帖子查询返回链接
这里是我的测试网站: http://calgarywildlife.org/wordpress/#
任何线索将不胜感激 谢谢!
这里是我的代码:
<?php query_posts(array('posts_per_page' => 2, 'cat=14')); ?>
<ul>
<?php if (have_posts()) while (have_posts()) : the_post(); ?>
<li>
<div class="hp-eventthumnb"><?php the_post_thumbnail(); ?></div>
<div class"hp-eventdetails">
<h1><?php the_title(); ?></h1>
<p><?php substr(the_excerpt(), 0 , 250); ?></p>
<a href="<?php the_permalink(); ?>">Read More</a>
</div>
</li>
<?php endwhile; ?>
UPDATE: 它只是似乎是从该查询生成的项目发生。我将任何其他HTML添加到页面,并且不会以相同的方式处理。
哪个按钮应该点击? – 2012-04-01 16:00:20
这正是我所面临的问题。它似乎会返回所有滑块条目上的链接(滑块下方) – patrick 2012-04-01 16:02:55