2012-06-25 113 views
0

我用插件wp-typeWordPress的顯示頁面

WP型插件用於製造自定義頁面。 您可以添加例如,鍵入「文件」的新領域,並顯示在頁面中filelink用下面的代碼:

<?php 
echo(types_render_field("file", array("title"=>"Download", "link"=>"true"))); 
?> 

我的問題是,當我嘗試顯示文件:在主網頁一切正常,但是當我嘗試使用index.php顯示帖子列表時,它不起作用。

這個問題只出現與我使用的職位頁:

<?php while (have_posts()) : the_post(); 
echo(types_render_field("file", array("title"=>"Download", "link"=>"true"))); 
endwhile;?> 

,而且運作良好。

請幫我顯示的index.php我嘗試這一切頁,每頁文件:

<?php while (wp_list_pages()); 
echo(types_render_field("file", array("title"=>"Download", "link"=>"true"))); 
endwhile;?> 

回答

0

替換您的代碼來顯示頁面列表:

while (wp_list_pages()); to while (wp_list_pages()):