我将以下内容添加到functions.php
文件以更改之后显示的“read more>”链接the_excerpt()
被调用。
add_filter( \'excerpt_more\', \'edit_more_link\', 11 );
function edit_more_link() { ?>
<a class="read-more" href="<?php the_permalink() ?>?template=iframe">read more »</a>
<?php
}
现在的问题是,链接出现在摘录文本之前。如果不添加代码,默认链接将出现在摘录之后,这正是我想要的。为什么会这样?