WordPress私密和密码保护文章标题前缀提示文字如何自定义设置呢,今天就给大家来分享一下。其实只需要一段代码就行了。
1、将下面的代码添加到您的当前主题的functions.php文件:
function change_protected_title_prefix(){return'Members Only:%s';}add_filter('protected_title_format','change_protected_title_prefix');
改变私密文章前缀文字。
2、将下面的代码添加到您的当前主题的functions.php文件。
function change_private_title_prefix(){return'Attention Writers:%s';}add_filter('private_title_format','change_private_title_prefix');