找到使用主题的functions.php文件,加入以下内容:
function addTarget($content) {
$result = str_replace('<a', '<a target="_blank"', $content);
return $result;
}
add_filter('the_content', 'addTarget');
THE END
找到使用主题的functions.php文件,加入以下内容:
function addTarget($content) {
$result = str_replace('<a', '<a target="_blank"', $content);
return $result;
}
add_filter('the_content', 'addTarget');