有一個搜索,似乎無法找到任何選項來做到這一點,發現了不少關於如何個性化登錄頁面的帖子,但沒有關於刪除受保護在頁面標題之前自動添加的文字,任何能夠釋放光線的人?刪除受保護的wordpress頁面的標題h1中的「受保護的」文本
編輯:
找到了答案這裏到底http://wordpress.org/support/topic/how-to-remove-private-from-private-pages,代碼如下
function the_title_trim($title)
{
$pattern[0] = '/Protected:/';
$pattern[1] = '/Private:/';
$replacement[0] = ''; // Enter some text to put in place of Protected:
$replacement[1] = ''; // Enter some text to put in place of Private:
return preg_replace($pattern, $replacement, $title);
}
add_filter('the_title', 'the_title_trim');
的字符串替換你想要的任何文本前綴[谷歌搜索「WordPress的保護」(HTTP:// WWW。作爲第一個結果,google.com/search?q=wordpress+protected)給了我[這個](http://wordpress.org/extend/plugins/protected-post-personalizer/)。它說它會讓你這樣做。 – DaveRandom
如果您找到了可接受的答案,請將其作爲答案發布並接受,而不是作爲對問題的修改。 – DaveRandom
曾經愛過,但沒有相關權限在72小時內回覆我自己的帖子或現在完成 – Nick