我想以Quote post格式从帖子中获取第一个blockquote(即使用户只写了一个或多个),以便在归档循环中显示它。例如:
$quote = has_post_format( \'quote\' );
if ( $quote ) {
if ( *the post has no quotes* ){
// Don\'t show anything
} else {
// Show the blockquote from the post (if there\'s only one),
// or the first one (if there are more than 1)
}
}
有这样的事吗?