我希望在每篇文章的开头重复文章标题。我已尝试将以下内容添加到functions.php
运气不好:
function add_post_content( $content ) {
if ( ! is_feed() && ! is_home() ) {
$content .= \'<p>.get_post(\'post_title\').</p>\';
}
return $content;
}
add_filter(\'the_content\', \'add_post_content\');
我应该尝试更新functions.php
文件或single.php
?