【wordpress】wp_queryの中身

手近なものを展開したから若干オリジナリティーが出ちゃってるけど、とりあえず。

WP_Query Object ( 

    [query] => Array ( 
        [event_area] => %e8%bf%91%e7%95%bf 
    ) 
    
    [query_vars] => Array ( 
        [event_area] => %e8%bf%91%e7%95%bf 
        [error] => 
        [m] => 
        [p] => 0 
        [post_parent] => 
        [subpost] => 
        [subpost_id] => 
        [attachment] => 
        [attachment_id] => 0 
        [name] => 
        [static] => 
        [pagename] => 
        [page_id] => 0 
        [second] => 
        [minute] => 
        [hour] => 
        [day] => 0 
        [monthnum] => 0 
        [year] => 0 
        [w] => 0 
        [category_name] => 
        [tag] => 
        [cat] => 
        [tag_id] => 
        [author] => 
        [author_name] => 
        [feed] => 
        [tb] => 
        [paged] => 0 
        [meta_key] => day1 
        [meta_value] => 20170504 
        [preview] => 
        [s] => 
        [sentence] => 
        [title] => 
        [fields] => 
        [menu_order] =>
        [e m b e d] => // embedの自動読み込み除けにスペース入れた、実戦では削除のこと
        [category__in] => Array ( ) 
        [category__not_in] => Array ( ) 
        [category__and] => Array ( ) 
        [post__in] => Array ( ) 
        [post__not_in] => Array ( ) 
        [post_name__in] => Array ( ) 
        [tag__in] => Array ( ) 
        [tag__not_in] => Array ( ) 
        [tag__and] => Array ( ) 
        [tag_slug__in] => Array ( ) 
        [tag_slug__and] => Array ( ) 
        [post_parent__in] => Array ( ) 
        [post_parent__not_in] => Array ( ) 
        [author__in] => Array ( ) 
        [author__not_in] => Array ( ) 
        [orderby] => meta_value 
        [order] => ASC 
        [posts_per_page] => 2 
        [meta_compare] => >= 
        [type] => DATE 
        [ignore_sticky_posts] => 
        [suppress_filters] => 
        [cache_results] => 1 
        [update_post_term_cache] => 1 
        [lazy_load_term_meta] => 1 
        [update_post_meta_cache] => 1 
        [post_type] => [nopaging] => 
        [comments_per_page] => 50 
        [no_found_rows] => 
        [taxonomy] => event_area 
        [term] => %e8%bf%91%e7%95%bf 
    ) 
        
    [tax_query] => WP_Tax_Query Object ( 
        [queries] => Array ( 
            [0] => Array ( 
                [taxonomy] => event_area 
                [terms] => Array ( 
                    [0] => %e8%bf%91%e7%95%bf 
                ) 
                [field] => slug 
                [operator] => IN 
                [include_children] => 1
            ) 
        ) 
        
        [relation] => AND 
        
        [table_aliases:protected] => Array ( 
            [0] => wp1_term_relationships 
        ) 
        [queried_terms] => Array ( 
            [event_area] => Array ( 
                [terms] => Array ( [0] => %e8%bf%91%e7%95%bf ) 
                [field] => slug 
            ) 
        ) 
        
        [primary_table] => wp1_posts [primary_id_column] => ID 
    ) 
    // tax_query
    
    
    
    [meta_query] => WP_Meta_Query Object ( 
    	[queries] => Array ( 
            [0] => Array ( 
                [key] => day1 
                [compare] => >= 
                [value] => 20170504 
            ) 
            [relation] => OR 
        ) 
        [relation] => AND 
        [meta_table] => wp1_postmeta 
        [meta_id_column] => post_id 
        [primary_table] => wp1_posts 
        [primary_id_column] => ID 
        [table_aliases:protected] => Array ( 
        	[0] => wp1_postmeta 
        ) 
        [clauses:protected] => Array ( 
            [wp1_postmeta] => Array ( 
                [key] => day1 
                [compare] => >= 
                [value] => 20170504 
                [alias] => wp1_postmeta 
                [cast] => CHAR 
            ) 
        ) 
        [has_or_relation:protected] => 
    ) 
    
    [date_query] => 
    
    [queried_object] => WP_Term Object ( 
        [term_id] => 30 
        [name] => 近畿 
        [slug] => %e8%bf%91%e7%95%bf 
        [term_group] => 0 
        [term_taxonomy_id] => 30 
        [taxonomy] => event_area 
        [description] => 
        [parent] => 0 
        [count] => 1 
        [filter] => raw 
        [term_order] => 7 
    ) 
    
    [queried_object_id] => 30 
    
    [request] => SELECT SQL_CALC_FOUND_ROWS wp1_posts.ID FROM wp1_posts LEFT JOIN wp1_term_relationships ON (
    	wp1_posts.ID = wp1_term_relationships.object_id
    ) 
    INNER JOIN wp1_postmeta ON (
    	 wp1_posts.ID = wp1_postmeta.post_id 
    ) 
    WHERE 1=1 AND ( 
    	wp1_term_relationships.term_taxonomy_id IN (30) 
    ) 
    AND (
    	 ( 
         	wp1_postmeta.meta_key = 'day1' AND wp1_postmeta.meta_value >= '20170504' 
        ) 
    ) 
    AND wp1_posts.post_type = 'event2' AND (
    	wp1_posts.post_status = 'publish' OR wp1_posts.post_status = 'private'
    ) 
    GROUP BY wp1_posts.ID ORDER BY wp1_postmeta.meta_value ASC LIMIT 0, 2 [posts] => Array ( 
    	[0] => WP_Post Object ( 
            [ID] => 2481 
            [post_author] => 1 
            [post_date] => 2017-05-01 19:11:58 
            [post_date_gmt] => 2017-05-01 10:11:58 
            [post_content] => 
            [post_title] => 講座情報 
            [post_excerpt] => 
            [post_status] => publish 
            [comment_status] => closed 
            [ping_status] => closed 
            [post_password] => 
            [post_name] => %e8%ac%9b%e5%ba%a7%e6%83%85%e5%a0%b1-4 
            [to_ping] => 
            [pinged] => 
            [post_modified] => 2017-05-01 19:11:58 
            [post_modified_gmt] => 2017-05-01 10:11:58 
            [post_content_filtered] => 
            [post_parent] => 0 
            [guid] => http://******/?post_type=event2&p=2481 
            [menu_order] => 1 
            [post_type] => event2 
            [post_mime_type] => 
            [comment_count] => 0 
            [filter] => raw 
        ) 
    ) 
    
    [post_count] => 1 
    [current_post] => -1 
    [in_the_loop] => 
    
    [post] => WP_Post Object ( 
        [ID] => 2481 
        [post_author] => 1 
        [post_date] => 2017-05-01 19:11:58 
        [post_date_gmt] => 2017-05-01 10:11:58 
        [post_content] => 
        [post_title] => 講座情報 
        [post_excerpt] => 
        [post_status] => publish 
        [comment_status] => closed 
        [ping_status] => closed 
        [post_password] => 
        [post_name] => %e8%ac%9b%e5%ba%a7%e6%83%85%e5%a0%b1-4 
        [to_ping] => 
        [pinged] => 
        [post_modified] => 2017-05-01 19:11:58 
        [post_modified_gmt] => 2017-05-01 10:11:58 
        [post_content_filtered] => 
        [post_parent] => 0 
        [guid] => http://test.pbm-institute.jp/?post_type=event2&p=2481 
        [menu_order] => 1 
        [post_type] => event2 
        [post_mime_type] => 
        [comment_count] => 0 
        [filter] => raw 
    ) 
    
    [comment_count] => 0 
    [current_comment] => -1 
    [found_posts] => 1 
    [max_num_pages] => 1 
    [max_num_comment_pages] => 0 
    [is_single] => 
    [is_preview] => 
    [is_page] => 
    [is_archive] => 1 
    [is_date] => 
    [is_year] => 
    [is_month] => 
    [is_day] => 
    [is_time] => 
    [is_author] => 
    [is_category] => 
    [is_tag] => 
    [is_tax] => 1 
    [is_search] => 
    [is_feed] => 
    [is_comment_feed] => 
    [is_trackback] => 
    [is_home] => 
    [is_404] => 
    [is_embed] => 
    [is_paged] => 
    [is_admin] => 
    [is_attachment] => 
    [is_singular] => 
    [is_robots] => 
    [is_posts_page] => 
    [is_post_type_archive] => 
    [query_vars_hash:WP_Query:private] => ea77eb350e88869741e6f90344e7b0d1 
    [query_vars_changed:WP_Query:private] => 1 
    [thumbnails_cached] => 
    [stopwords:WP_Query:private] => 
    [compat_fields:WP_Query:private] => Array ( 
        [0] => query_vars_hash [1] => query_vars_changed 
    ) 
    [compat_methods:WP_Query:private] => Array ( 
        [0] => init_query_flags 
        [1] => parse_tax_query 
    ) 
) 

 

コメントを残す

メールアドレスが公開されることはありません。

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください