wordpress登入頁面去除wordpress瀏覽器標題-客製修改7

wordpress登入頁面去除wordpress瀏覽器標題-客製修改7

之前文章wordpress自訂管理介面-4個必裝外掛簡介有介紹過如何客製wordpress的管理介面,通常用到這些外掛,都會把wordpress相關字詞都去除掉,但最近突然發現,登入頁面標題竟然還有附加wordpress,而且White Label CMS也找不到設定可以去除,只好增加自訂函式。


在wordpress插入函式

參考文章Removing label ‘WordPress’ from the title bar,在function加上custom_login_title的函式(建議使用code snippets外掛來添加自訂函式)

// Put this in your functions.php file
function custom_login_title( $login_title ) {
return str_replace(array( ' ‹', ' — WordPress'), array( ' ‹', ''),$login_title );
}
add_filter( 'login_title', 'custom_login_title' );

測試結果

wordpress bye bye囉!


後記

我覺得White Label CMS沒有移除wordpress登入標題功能是件奇怪的事,因為幾乎所有wordpress的詞它都可以隱藏或移除,也許之後的版本就會有了吧。總之還是把這客製修改給記錄下來。

好文分享給朋友

您可能還喜歡...