我使用WP出版物存档插件WP_Query标题链接无法显示
我想列出出版附着到自定义模板,所以我写了下面的代码。
第一个只显示标题。但我想要的是直接链接到发布文件
所以在类别ID 13我需要近5文件直接下载链接列表
<?php
// The Query
$the_query = new WP_Query('cat=13&post_type=publication&numberposts=5');
// The Loop
while ($the_query->have_posts()) : $the_query->the_post();
echo '<li>';
the_title();
echo '</li>';
endwhile;
// Reset Post Data
wp_reset_postdata();
?>
下面一个没有显示链接,请告诉我错了吗?
<?php
// The Query
$the_query = new WP_Query('cat=13&post_type=publication&numberposts=5');
// The Loop
while ($the_query->have_posts()) : $the_query->the_post();
echo '<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>';
endwhile;
// Reset Post Data
wp_reset_postdata();
?>
链接都OK和标题是确定的,但在我的页面显示如下 没有链接到标题 http://project.xxx.com/wp-content/plugins/wp-publication-archive/includes/openfile.php?file=http|project.xxx .COM /可湿性粉剂内容/上传/ 2012/03/tor_proce ss_monitoring.pdf这是一个演示文件(下载出版物) – user1132928 2012-03-19 23:07:44