2014-10-05 62 views
0

我想從wordpress標題中刪除符號& raquo。此符號在每一頁頁標題前加:標題中的Wordpress符號

http://i.stack.imgur.com/7I5xf.png

+0

看着你的代碼。這是css的東西,或者直接添加到php文件中。我們無法幫助更多,因爲我們不知道對方是怎麼回事...... – drip 2014-10-05 11:34:09

+0

我在php中添加了修剪,它可以。修剪(wp_title( '')); – praashaad 2014-10-05 11:39:52

回答

0

您可以使用add_filter()用於此目的。

一個簡單的例子是像

add_filter('the_title', 'lose_four_chars'); 

function lose_four_chars($title) { 
if (is_single()) { 
    return substr($title, 4); 
} else { 
    return $title; 
} 
} 

其中lose_four_chars功能可與您的手動功能所取代..

請看看here