the_post

函数
the_post ( No parameters )
定义位置
相关方法
write_posthave_postsget_postedit_postget_posts
引入
1.5.0
弃用
-

post是一个WordPress函数,用于在循环中设置当前文章。WordPress循环调用它来检索当前文章,并设置各种全局变量,如$post和$id。

在循环中迭代文章索引。

function the_post() {
	global $wp_query;

	if ( ! isset( $wp_query ) ) {
		return;
	}

	$wp_query->the_post();
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-14 12:36:31

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: