本篇文章将持续更新WordPress中博主常用或者可能用到的钩子方法
代码
1.给文章末端添加签名或者广告,钩子:the_content
function wpb_after_post_content($content){
if (is_single()) {
$content .= '你的签名语句或者广告代码';
}
return $content;
}
add_filter( "the_content", "wpb_after_post_content" );