由于您手动添加了帖子中的所有html,您是否尝试过过滤内容?
类似于WordPress的<--更多-->;tag,您可以添加<--my\\u headline\\u内容-->;
然后:
add_filter( \'the_content\', \'my_headline_function_12378\' );
function my_headline_function_12378( $post_content ){
/*
* get your recent posts\' data. You\'ll find the code with a simple search.
* say $headline contains the headline html (link, addnl info, whatever)
* swap your tag with this headline
*/
$the_content = preg_replace( \'/<!--my_headline_content-->/i\', $headline, $the_content );
return $the_content;
}
完成。