這裏是我想做的事:WordPress的顯示更多的條目頁腳
我有我想只顯示到特定時間點的博客文章。所以在後我把
<!--more-->
在正確的位置。
我content.php看起來是這樣的:
<div class="entry-content">
<?php the_content('read more'); ?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php mytheme_entry_footer(); ?>
</footer><!-- .entry-footer -->
的「更多」鏈接獲取內容,它應該是右後顯示。但是,如何使用「註釋」鏈接將其顯示在輸入頁腳內?
是否有與解決方案摘錄?
<?php the_excerpt(); ?>
我認爲這樣做會更好,因爲我不需要在每一篇文章中都加入這一行。
這對我來說很好。我使用the_excerpt()而不是the_content()。 如果帖子實際上太長,是否可以只顯示鏈接? (超過55個字符) –
@HansUllrich或許您可以檢查摘錄('get_the_excerpt()')的長度(等於內容的長度)('get_the_content()')。如果他們不同,你可以顯示閱讀更多鏈接。 – vicente
好吧,如果我使條件get_the_excerpt()