我使用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