
在使用wordpress博客时,如果你经常要对特定的关键词加粗,可以添加以下程序代码自动进行加粗。
在主题文件夹下的functions.php文件中添加:
1
2
3
4
5
add_filter('the_content','web589_content_strong');
function web589_content_strong($content){
$content=str_replace('关键词','<b>关键词</b>',$content);
return $conte...