如何在WordPress的作者长篇传记中添加“阅读更多”

问题描述 投票:0回答:1

如何在WordPress的作者长篇传记中添加“阅读更多”。点击“阅读更多”后,直接在作者的个人资料页面上阅读作者。请尝试解决问题。先感谢您。 enter image description here

wordpress
1个回答
0
投票

您可以看到更多按钮,如下面的屏幕截图所示。确定要放置更多按钮的断点,将光标放在那里,然后单击更多按钮。但是,当您单击更多按钮时,将不会有任何文本的更多按钮。要编辑read more按钮,请将以下函数放在functions.php文件中。

enter image description here

将此代码添加到functions.php文件中可以自定义读取更多链接文本。

function modify_read_more_link() {
    return '<a class="more-link" href="' . get_permalink() . '">Your Read More Link Text</a>';
}
add_filter( 'the_content_more_link', 'modify_read_more_link' );

参考:https://codex.wordpress.org/Customizing_the_Read_More

© www.soinside.com 2019 - 2024. All rights reserved.