📜  wordpress post excerpt from post id - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:56.941000             🧑  作者: Mango

代码示例1
post_excerpt ) ? $post->post_excerpt : $post->post_content;
 
$excerpt = substr($excerpt, 0, 260);
$result = substr($excerpt, 0, strrpos($excerpt, ' '));
echo $result;
?>