1

我想更改 WordPress 中的阅读更多链接,我找到了一些教程,<!-- more -->我可以在其中编写其他内容<!-- more Proceed... -->(这不起作用)。在 index.php 中我应该编辑<?php the_content('Read More..,'); ?>,但在我的 index.php 中没有 Read More 文本,它看起来像这样<?php the_content(''); ?>,它是空的,它仍然在帖子上显示 Read More。

任何其他想法如何改变它?

4

2 回答 2

0

在 function.php 文件中添加这段代码

// Replaces the excerpt "more" text by a link
function new_excerpt_more($more) {
   global $post;
   return '<a class="moretag" href="'. get_permalink($post->ID) . '"> Read more...      </a>';
}
add_filter('excerpt_more', 'new_excerpt_more');
于 2013-09-27T18:19:11.600 回答
0

您可以更改

<?php the_content(''); ?> 

进入任何你想要的。所以你可以做到:

<?php the_content('more Proceed... '); ?> 

或任何你想要的。当您保持打开状态时,“阅读更多...”是默认设置。

于 2012-11-13T20:32:34.180 回答