【发布时间】:2017-12-12 06:43:56
【问题描述】:
我在我的functions.php中创建了一个自定义帖子类型:
add_action( 'init', 'create_post_type' );
function create_post_type() {
register_post_type(
'specialities',
array(
'labels' => array(
'name' => __( 'Besonderheiten' ),
'singular_name' => __( 'Besonderheit' )
),
'public' => true,
'has_archive' => true,
'supports' => array('title', 'editor', 'thumbnail')
)
);
}
然后我在 wp-admin 部分添加了一些帖子。
我查询了所有帖子:
$args = query_posts( array(
'post_type' => 'specialities',
'posts_per_page' => -1
));
$query = new WP_Query($args);
为了确保 $query 不为空,我 var_dumped 了整个内容 -> 它不为空。 var_dump 显示了我所有的帖子。
所以我尝试循环这个查询:
<?php if(!empty($query)){ ?>
<div class="slideshow clearfix">
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<div class="specialities clearfix"><?php echo the_title(); ?></div>
<?php endwhile; ?>
</div>
<?php } ?>
在网络检查器中,我可以看到 div(幻灯片 clearfix)但没有子 div(专业 clearfix)。为什么???
所以如果这里是 var_dump:
object(WP_Query)#6956 (48) { ["query"]=> array(5) { [0]=> object(WP_Post)#6961 (24) { ["ID"]=> int(59 ) ["post_author"]=> string(1) "1" ["post_date"]=> string(19) "2017-07-07 21:03:19" ["post_date_gmt"]=> string(19) " 2017-07-07 19:03:19" ["post_content"]=> string(591) "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua . 在 vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore " ["post_title"]=> string(8) "Beispiel" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string( 6)“关闭”[“ping_status”]=>字符串(6)“关闭”[“post_password”]=>字符串(0)“”[“post_name”]=>字符串(8)“beispiel”[“to_ping” ]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2017-07-07 21:03:42" ["post_modified_gmt"] => string(19) "2017-07-07 19:03:42" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string (57) "" ["menu_order"]=> int(0) ["post_type"]=> string(12) "specialities" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" } [1]=> object(WP_Post)#6923 (24) { ["ID"]=> int(57) [" post_author"]=> string(1) "1" ["post_date"]=> string(19) "2017-07-07 21:01:06" ["post_date_gmt"]=> string(19) "2017-07 -07 19:01:06" ["post_content"]=> string(591) "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,sed diam voluptua。在 vero eos et accusam et justo duo dolores et ea rebum。 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet。 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua。在 vero eos et accusam et justo duo dolores et ea rebum。 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet。" ["post_title"]=> string(8) "Spaetzle" ["post_excerpt"]=> string(0) "" ["post_status"]= > 字符串(7)“发布”[“comment_status”]=>字符串(6)“关闭”[“ping_status”]=>字符串(6)“关闭”[“post_password”]=>字符串(0)“”[ "post_name"]=> string(8) "spaetzle" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2017-07-07 21:01:06" ["post_modified_gmt"]=> 字符串(19) "2017-07-07 19:01:06" ["post_content_filtered"]=> 字符串(0) "" [" post_parent"]=> int(0) ["guid"]=> string(57) "" ["menu_order"]=> int(0) ["post_type"]=> string(12) "specialities" ["post_mime_type "]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" } [2]=> object(WP_Post)#6960 (24) { ["ID"]=> int(55) ["post_author"]=> string(1) "1" ["post_date"]=> string(19) "2017-07-07 21:00: 11" ["post_date_gmt"]=> string(19) "2017-07-07 19:00:11" ["post_content"]=> string(591) "Lorem ipsum dolor sat ame t, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua。在 vero eos et accusam et justo duo dolores et ea rebum。 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet。 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua。在 vero eos et accusam et justo duo dolores et ea rebum。 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." ["post_title"]=> string(14) "Pasta Pomodoro" ["post_excerpt"]=> string(0) "" ["post_status"] => 字符串(7)“发布”[“comment_status”]=> 字符串(6)“关闭”[“ping_status”]=> 字符串(6)“关闭”[“post_password”]=> 字符串(0)“” ["post_name"]=> string(14) "pasta-pomodoro" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string (19) "2017-07-07 21:00:11" ["post_modified_gmt"]=> 字符串(19) "2017-07-07 19:00:11" ["post_content_filtered"]=> 字符串(0) " " ["post_parent"]=> int(0) ["guid"]=> string(57) "" ["menu_order"]=> int(0) ["post_type"]=> string(12) "specialities" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" } [3]=> object(WP_Post )#6998 (24) { ["ID"]=> int(53) ["post_author"]=> string(1) "1" ["post_date"]=> string(19) "2017-07-07 20 :57:49" ["post_date_gmt"]=> 字符串(19) "2017-07-07 18:57:49" ["post_content"]=> 字符串(591) "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua。在 vero eos et accusam et justo duo dolores et ea rebum。 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet。 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua。在 vero eos et accusam et justo duo dolores et ea rebum。 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." ["post_title"]=> string(24) "Pasta Tomaten Mozzarella" ["post_excerpt"]=> string(0) "" ["post_status" ]=>字符串(7)“发布”[“comment_status”]=>字符串(6)“关闭”[“ping_status”]=>字符串(6)“关闭”[“post_password”]=>字符串(0)“ " ["post_name"]=> string(2) "53" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string( 19) "2017-07-07 20:59:08" ["post_modified_gmt"]=> 字符串(19) "2017-07-07 18:59:08" ["post_content_filtered"]=> 字符串(0) "" ["post_parent"]=> int(0) ["guid"]=> string(57) "" ["menu_order"]=> int(0) ["post_type"]=> string(12) "specialities" [ "post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" } [4]=> object(WP_Post) #6995 (24) { ["ID"]=> int(51) ["post_author"]=> string(1) "1" ["post_date"]=> string(19) "2017-07-07 20: 56:44" ["post_date_gmt"]=> string(19) "2017-07-07 18:56:44" ["post_content"]=> string(591) "Lorem ipsum do lor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua。在 vero eos et accusam et justo duo dolores et ea rebum。 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet。 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua。在 vero eos et accusam et justo duo dolores et ea rebum。 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet。" ["post_title"]=> string(9) "Hamburger" ["post_excerpt"]=> string(0) "" ["post_status"]= > 字符串(7)“发布”[“comment_status”]=>字符串(6)“关闭”[“ping_status”]=>字符串(6)“关闭”[“post_password”]=>字符串(0)“”[ "post_name"]=> string(9) "hamburger" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2017-07-07 20:56:44" ["post_modified_gmt"]=> 字符串(19) "2017-07-07 18:56:44" ["post_content_filtered"]=> 字符串(0) "" [" post_parent"]=> int(0) ["guid"]=> string(57) "" ["menu_order"]=> int(0) ["post_type"]=> string(12) "specialities" ["post_mime_type "]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" } } ["query_vars"]=> array(69 ) { [0]=> object(WP_Post)#6961 (24) { ["ID"]=> int(59) ["post_author"]=> string(1) "1" ["post_date"]=> string (19) "2017-07-07 21:03:19" ["post_date_gmt"]=> 字符串(19) "2017-07-07 19:03:19" ["post_content"]=> 字符串g(591) “Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua。在 vero eos et accusam et justo duo dolores et ea rebum。 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet。 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua。在 vero eos et accusam et justo duo dolores et ea rebum。 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." ["post_title"]=> string(8) "Beispiel" ["post_excerpt"]=> string(0) "" ["post_status"]= > 字符串(7)“发布”[“comment_status”]=>字符串(6)“关闭”[“ping_status”]=>字符串(6)“关闭”[“post_password”]=>字符串(0)“”[ "post_name"]=> string(8) "beispiel" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2017-07-07 21:03:42" ["post_modified_gmt"]=> 字符串(19) "2017-07-07 19:03:42" ["post_content_filtered"]=> 字符串(0) "" [" post_parent"]=> int(0) ["guid"]=> string(57) "" ["menu_order"]=> int(0) ["post_type"]=> string(12) "specialities" ["post_mime_type "]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" } [1]=> object(WP_Post)#6923 (24) { ["ID"]=> int(57) ["post_author"]=> string(1) "1" ["post_date"]=> string(19) "2017-07-07 21:01: 06" ["post_date_gmt"]=> string(19) "2017-07-07 19:01:06" ["post_content"]=> string(591) "Lorem ipsum dolor sat ame t, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua。在 vero eos et accusam et justo duo dolores et ea rebum。 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet。 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua。在 vero eos et accusam et justo duo dolores et ea rebum。 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet。" ["post_title"]=> string(8) "Spaetzle" ["post_excerpt"]=> string(0) "" ["post_status"]= > 字符串(7)“发布”[“comment_status”]=>字符串(6)“关闭”[“ping_status”]=>字符串(6)“关闭”[“post_password”]=>字符串(0)“”[ "post_name"]=> string(8) "spaetzle" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2017-07-07 21:01:06" ["post_modified_gmt"]=> 字符串(19) "2017-07-07 19:01:06" ["post_content_filtered"]=> 字符串(0) "" [" post_parent"]=> int(0) ["guid"]=> string(57) "" ["menu_order"]=> int(0) ["post_type"]=> string(12) "specialities" ["post_mime_type "]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" } [2]=> object(WP_Post)#6960 (24) { ["ID"]=> int(55) ["post_author"]=> string(1) "1" ["post_date"]=> string(19) "2017-07-07 21:00: 11" ["post_date_gmt"]=> string(19) "2017-07-07 19:00:11" ["post_content"]=> string(591) "Lorem ipsum dolor sat ame t, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua。在 vero eos et accusam et justo duo dolores et ea rebum。 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet。 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua。在 vero eos et accusam et justo duo dolores et ea rebum。 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." ["post_title"]=> string(14) "Pasta Pomodoro" ["post_excerpt"]=> string(0) "" ["post_status"] => 字符串(7)“发布”[“comment_status”]=> 字符串(6)“关闭”[“ping_status”]=> 字符串(6)“关闭”[“post_password”]=> 字符串(0)“” ["post_name"]=> string(14) "pasta-pomodoro" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string (19) "2017-07-07 21:00:11" ["post_modified_gmt"]=> 字符串(19) "2017-07-07 19:00:11" ["post_content_filtered"]=> 字符串(0) " " ["post_parent"]=> int(0) ["guid"]=> string(57) "" ["menu_order"]=> int(0) ["post_type"]=> string(12) "specialities" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" } [3]=> object(WP_Post )#6998 (24) { ["ID"]=> int(53) ["post_author"]=> string(1) "1" ["post_date"]=> string(19) "2017-07-07 20 :57:49" ["post_date_gmt"]=> 字符串(19) "2017-07-07 18:57:49" ["post_content"]=> 字符串(591) "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua。在 vero eos et accusam et justo duo dolores et ea rebum。 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet。 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua。在 vero eos et accusam et justo duo dolores et ea rebum。 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." ["post_title"]=> string(24) "Pasta Tomaten Mozzarella" ["post_excerpt"]=> string(0) "" ["post_status" ]=>字符串(7)“发布”[“comment_status”]=>字符串(6)“关闭”[“ping_status”]=>字符串(6)“关闭”[“post_password”]=>字符串(0)“ " ["post_name"]=> string(2) "53" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string( 19) "2017-07-07 20:59:08" ["post_modified_gmt"]=> 字符串(19) "2017-07-07 18:59:08" ["post_content_filtered"]=> 字符串(0) "" ["post_parent"]=> int(0) ["guid"]=> string(57) "" ["menu_order"]=> int(0) ["post_type"]=> string(12) "specialities" [ "post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" } [4]=> object(WP_Post) #6995 (24) { ["ID"]=> int(51) ["post_author"]=> string(1) "1" ["post_date"]=> string(19) "2017-07-07 20: 56:44" ["post_date_gmt"]=> string(19) "2017-07-07 18:56:44" ["post_content"]=> string(591) "Lorem ipsum do lor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua。在 vero eos et accusam et justo duo dolores et ea rebum。 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet。 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua。在 vero eos et accusam et justo duo dolores et ea rebum。 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet。" ["post_title"]=> string(9) "Hamburger" ["post_excerpt"]=> string(0) "" ["post_status"]= > 字符串(7)“发布”[“comment_status”]=>字符串(6)“关闭”[“ping_status”]=>字符串(6)“关闭”[“post_password”]=>字符串(0)“”[ "post_name"]=> string(9) "hamburger" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2017-07-07 20:56:44" ["post_modified_gmt"]=> 字符串(19) "2017-07-07 18:56:44" ["post_content_filtered"]=> 字符串(0) "" [" post_parent"]=> int(0) ["guid"]=> string(57) "" ["menu_order"]=> int(0) ["post_type"]=> string(12) "specialities" ["post_mime_type "]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" } ["error"]=> string(0) "" ["m"]=> string(0) "" ["p"]=> int(0) ["post_parent"]=> string(0) "" ["subpost"]=> string(0) "" ["subpost_id"]=> string(0) "" ["attachment"]=> string(0) "" ["attachment_id"]=> int(0) ["name"]=> string(0) ““ [“静止的”] => string(0) "" ["pagename"]=> string(0) "" ["page_id"]=> int(0) ["second"]=> string(0) "" ["minute"] => string(0) "" ["hour"]=> string(0) "" ["day"]=> int(0) ["monthnum"]=> int(0) ["year"]=> int(0) ["w"]=> int(0) ["category_name"]=> string(0) "" ["tag"]=> string(0) "" ["cat"]=> string( 0) "" ["tag_id"]=> string(0) "" ["author"]=> string(0) "" ["author_name"]=> string(0) "" ["feed"]=> string(0) "" ["tb"]=> string(0) "" ["paged"]=> int(0) ["meta_key"]=> string(0) "" ["meta_value"]=> string(0) "" ["preview"]=> string(0) "" ["s"]=> string(0) "" ["sentence"]=> string(0) "" ["title"] => string(0) "" ["fields"]=> string(0) "" ["menu_order"]=> string(0) "" ["embed"]=> string(0) "" ["category__in "]=> array(0) { } ["category__not_in"]=> array(0) { } ["category__and"]=> array(0) { } ["post__in"]=> array(0) { } [ "post__not_in"]=> array(0) { } ["post_name__in"]=> array(0) { } ["tag__in"]=> array(0) { } ["tag__not_in"]=> array(0) { } ["tag__and"]=> 数组(0) { } ["tag_slug__in"]=> 数组(0) { } ["tag_sl ug__and"]=> 数组(0) { } ["post_parent__in"]=> 数组(0) { } ["post_parent__not_in"]=> 数组(0) { } ["author__in"]=> 数组(0) { } ["author__not_in"]=> array(0) { } ["ignore_sticky_posts"]=> bool(false) ["suppress_filters"]=> bool(false) ["cache_results"]=> bool(true) ["update_post_term_cache" ]=> bool(true) ["lazy_load_term_meta"]=> bool(true) ["update_post_meta_cache"]=> bool(true) ["post_type"]=> string(0) "" ["posts_per_page"]=> int (10) ["nopaging"]=> bool(false) ["cmets_per_page"]=> string(2) "50" ["no_found_rows"]=> bool(false) ["order"]=> string(4) "DESC" } ["tax_query"]=> object(WP_Tax_Query)#7005 (6) { ["queries"]=> array(0) { } ["relation"]=> string(3) "AND" [" table_aliases":protected]=> array(0) { } ["queried_terms"]=> array(0) { } ["primary_table"]=> string(8) "wp_posts" ["primary_id_column"]=> string(2 ) "ID" } ["meta_query"]=> object(WP_Meta_Query)#7004 (9) { ["queries"]=> array(0) { } ["relation"]=> NULL ["meta_table"]=> NULL ["meta_id_column"]=> NULL ["primary_table"]=> NUL L ["primary_id_column"]=> NULL ["table_aliases":protected]=> array(0) { } ["clauses":protected]=> array(0) { } ["has_or_relation":protected]=> bool( false) } ["date_query"]=> bool(false) ["request"]=> string(259) "SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'acf-disabled' OR wp_posts.post_status = 'private') ORDER BY wp_posts.post_date DESC LIMIT 0, 10" ["posts"]=> array(0) { } ["post_count "]=> int(0) ["current_post"]=> int(-1) ["in_the_loop"]=> bool(false) ["comment_count"]=> int(0) ["current_comment"]=> int (-1) ["found_posts"]=> int(0) ["max_num_pages"]=> int(0) ["max_num_comment_pages"]=> int(0) ["is_single"]=> bool(false) [" is_preview"]=> bool(false) ["is_page"]=> bool(false) ["is_archive"]=> bool(false) ["is_date"]=> bool(false) ["is_year"]=> bool (false) ["is_month"]=> bool(false) ["is_day"]=> bool(false) ["is_time"]=> bool(false) ["is_author"]=> bool(false) ["is_categ ory"]=> bool(false) ["is_tag"]=> bool(false) ["is_tax"]=> bool(false) ["is_search"]=> bool(false) ["is_feed"]=> bool (false) ["is_comment_feed"]=> bool(false) ["is_trackback"]=> bool(false) ["is_home"]=> bool(true) ["is_404"]=> bool(false) ["is_embed "]=> bool(false) ["is_paged"]=> bool(false) ["is_admin"]=> bool(false) ["is_attachment"]=> bool(false) ["is_singular"]=> bool( false) ["is_robots"]=> bool(false) ["is_posts_page"]=> bool(false) ["is_post_type_archive"]=> bool(false) ["query_vars_hash":"WP_Query":private]=> string( 32) "efaea6907a432061160b874915d6ab95" ["query_vars_changed":"WP_Query":private]=> bool(false) ["thumbnails_cached"]=> bool(false) ["stopwords":"WP_Query":private]=> NULL ["compat_fields ":"WP_Query":private]=> array(2) { [0]=> string(15) "query_vars_hash" [1]=> string(18) "query_vars_changed" } ["compat_methods":"WP_Query":private ]=> array(2) { [0]=> string(16) "init_query_flags" [1]=> string(15) "parse_tax_query" } }
【问题讨论】:
-
这可能会有所帮助:digwp.com/2011/05/loops