嗯,移除autop 筛选自the_content 过滤器标签在这里没有意义,因为您从未应用过the_content 代码中的筛选器。。。
让我们看看的源代码the_content() 功能:
function the_content( $more_link_text = null, $strip_teaser = false) {
        $content = get_the_content( $more_link_text, $strip_teaser );
        $content = apply_filters( \'the_content\', $content );
        $content = str_replace( \']]>\', \']]>\', $content );
        echo $content;
}
 如您所见,它适用于
the_content 筛选到的结果
get_the_content() 作用
那么您的函数应该是什么样子呢?
function yb_link_post() {
    $link_post_title = \'<strong class="headline"><a href="\' . get_permalink() . \'" title="\' . esc_attr(get_the_title()) . \'">\' . get_the_title() . \'</a></strong>\';
    $link_post_content = $link_post_title . \' — \' . get_the_content();
  // you don\'t have to remove autop filter if you want to run it anyway... and content is already modified, so it will be `autop`ed correctly.
    $content = apply_filters(\'the_content\', $link_post_content);
    $content = str_replace( \']]>\', \']]>\', $content );
    echo $content;
}
 附言:你不应该使用
<b> - 使用
<strong> 相反此外,您应该正确地转义所有内容(即,如果您打印
get_the_title() 作为html属性,您应该运行
esc_attr 在上面)。