
如何为WordPress自定义文章类型创建高级搜索表单
the_post ( No parameters )
post是一个WordPress函数,用于在循环中设置当前文章。WordPress循环调用它来检索当前文章,并设置各种全局变量,如$post和$id。
在循环中迭代文章索引。
function the_post() { global $wp_query; if ( ! isset( $wp_query ) ) { return; } $wp_query->the_post(); }