{"id":162160,"date":"2013-07-02T02:15:45","date_gmt":"2013-07-01T17:15:45","guid":{"rendered":"https:\/\/ja.wordpress.org\/support\/2013\/07\/02\/%e8%a8%98%e4%ba%8b%e4%b8%80%e8%a6%a7%e3%81%ae%e3%82%bd%e3%83%bc%e3%83%88%e3%82%92pre_get_posts%e3%81%a7%e5%87%ba%e6%9d%a5%e3%82%8b%e3%82%88%e3%81%86%e3%81%ab%e3%81%97%e3%81%9f%e3%81%84\/"},"modified":"2013-07-02T02:15:45","modified_gmt":"2013-07-01T17:15:45","slug":"%e8%a8%98%e4%ba%8b%e4%b8%80%e8%a6%a7%e3%81%ae%e3%82%bd%e3%83%bc%e3%83%88%e3%82%92pre_get_posts%e3%81%a7%e5%87%ba%e6%9d%a5%e3%82%8b%e3%82%88%e3%81%86%e3%81%ab%e3%81%97%e3%81%9f%e3%81%84","status":"closed","type":"topic","link":"https:\/\/ja.wordpress.org\/support\/topic\/%e8%a8%98%e4%ba%8b%e4%b8%80%e8%a6%a7%e3%81%ae%e3%82%bd%e3%83%bc%e3%83%88%e3%82%92pre_get_posts%e3%81%a7%e5%87%ba%e6%9d%a5%e3%82%8b%e3%82%88%e3%81%86%e3%81%ab%e3%81%97%e3%81%9f%e3%81%84\/","title":{"rendered":"\u8a18\u4e8b\u4e00\u89a7\u306e\u30bd\u30fc\u30c8\u3092pre_get_posts\u3067\u51fa\u6765\u308b\u3088\u3046\u306b\u3057\u305f\u3044"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f<\/p>\n<p>\u8a18\u4e8b\u4e00\u89a7\u30da\u30fc\u30b8\u3067\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3067\u30bd\u30fc\u30c8\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre><code>&lt;?php $uri = home_url( &#039;\/&#039; ); ?&gt;\n    &lt;?php if( is_category() or is_tag() or is_tax() ) : ?&gt;\n      &lt;?php $term = get_queried_object(); ?&gt;\n      &lt;?php if ( $term ) : ?&gt;\n        &lt;?php $uri = get_term_link( $term , $term-&gt;taxonomy ); ?&gt;\n      &lt;?php endif; ?&gt;\n    &lt;?php endif; ?&gt;\n\t&lt;?php echo $uri; ?&gt;\n\n    &lt;div class=&quot;sort&quot;&gt;\n    &lt;select name=&quot;original-sort-dropdown&quot; onchange=&#039;document.location.href=this.options[this.selectedIndex].value;&#039;&gt;\n\n      &lt;?php $Selected = &#039;&#039;; if( !empty( $_GET[&quot;orderby&quot;] ) &amp;&amp; !empty( $_GET[&quot;order&quot;] ) ) : if( $_GET[&quot;orderby&quot;] == &#039;date&#039; &amp;&amp; $_GET[&quot;order&quot;] == &#039;DESC&#039; ) : $Selected = &#039;selected=&quot;selected&quot;&#039;; endif; endif; ?&gt;\n      &lt;option value=&quot;&lt;?php echo add_query_arg( array( &#039;orderby&#039; =&gt; &#039;date&#039; , &#039;order&#039; =&gt; &#039;DESC&#039; , &quot;s&quot; =&gt; get_query_var(&#039;s&#039;) ), $uri ); ?&gt;&quot; &lt;?php echo $Selected ?&gt;&gt;\u65e5\u4ed8\u306e\u65b0\u3057\u3044\u9806&lt;\/option&gt;\n\n      &lt;?php $Selected = &#039;&#039;; if( !empty( $_GET[&quot;orderby&quot;] ) &amp;&amp; !empty( $_GET[&quot;order&quot;] ) ) : if( $_GET[&quot;orderby&quot;] == &#039;date&#039; &amp;&amp; $_GET[&quot;order&quot;] == &#039;ASC&#039; ) : $Selected = &#039;selected=&quot;selected&quot;&#039;; endif; endif; ?&gt;\n      &lt;option value=&quot;&lt;?php echo add_query_arg( array( &#039;orderby&#039; =&gt; &#039;date&#039; , &#039;order&#039; =&gt; &#039;ASC&#039; , &quot;s&quot; =&gt; get_query_var(&#039;s&#039;) ), $uri ); ?&gt;&quot; &lt;?php echo $Selected ?&gt;&gt;\u65e5\u4ed8\u306e\u53e4\u3044\u9806&lt;\/option&gt;  \n\n      &lt;?php $Selected = &#039;&#039;; if( !empty( $_GET[&quot;orderby&quot;] ) &amp;&amp; !empty( $_GET[&quot;order&quot;] ) ) : if( $_GET[&quot;orderby&quot;] == &#039;title&#039; &amp;&amp; $_GET[&quot;order&quot;] == &#039;ASC&#039; ) : $Selected = &#039;selected=&quot;selected&quot;&#039;; endif; endif; ?&gt;\n      &lt;option value=&quot;&lt;?php echo add_query_arg( array( &#039;orderby&#039; =&gt; &#039;title&#039; , &#039;order&#039; =&gt; &#039;ASC&#039; , &quot;s&quot; =&gt; get_query_var(&#039;s&#039;) ), $uri ); ?&gt;&quot; &lt;?php echo $Selected ?&gt;&gt;\u30bf\u30a4\u30c8\u30eb\u9806\uff08\u3042\uff5e\u308f\u30fb\uff21\uff5e\uff3a\uff09&lt;\/option&gt;\n\n      &lt;?php $Selected = &#039;&#039;; if( !empty( $_GET[&quot;orderby&quot;] ) &amp;&amp; !empty( $_GET[&quot;order&quot;] ) ) : if( $_GET[&quot;orderby&quot;] == &#039;title&#039; &amp;&amp; $_GET[&quot;order&quot;] == &#039;DESC&#039; ) : $Selected = &#039;selected=&quot;selected&quot;&#039;; endif; endif; ?&gt;\n      &lt;option value=&quot;&lt;?php echo add_query_arg( array( &#039;orderby&#039; =&gt; &#039;title&#039; , &#039;order&#039; =&gt; &#039;DESC&#039; , &quot;s&quot; =&gt; get_query_var(&#039;s&#039;) ), $uri ); ?&gt;&quot; &lt;?php echo $Selected ?&gt;&gt;\u30bf\u30a4\u30c8\u30eb\u9806\uff08\u308f\uff5e\u3042\u30fb\uff3a\uff5e\uff21\uff09&lt;\/option&gt;  \n\n      &lt;?php $Selected = &#039;&#039;; if( !empty( $_GET[&quot;meta_key&quot;] ) &amp;&amp; !empty( $_GET[&quot;order&quot;] ) ) : if( $_GET[&quot;meta_key&quot;] == &#039;ratings_average&#039; &amp;&amp; $_GET[&quot;order&quot;] == &#039;DESC&#039; ) : $Selected = &#039;selected=&quot;selected&quot;&#039;; endif; endif; ?&gt;\n      &lt;option value=&quot;&lt;?php echo add_query_arg( array( &#039;meta_key&#039; =&gt; &#039;ratings_average&#039; , &#039;order&#039; =&gt; &#039;DESC&#039; , &quot;s&quot; =&gt; get_query_var(&#039;s&#039;) ), $uri ); ?&gt;&quot; &lt;?php echo $Selected ?&gt;&gt;\u8a55\u4fa1\u306e\u9ad8\u3044\u9806\uff08\u5e73\u5747\uff09&lt;\/option&gt;\n\n      &lt;?php $Selected = &#039;&#039;; if( !empty( $_GET[&quot;meta_key&quot;] ) &amp;&amp; !empty( $_GET[&quot;order&quot;] ) ) : if( $_GET[&quot;meta_key&quot;] == &#039;ratings_average&#039; &amp;&amp; $_GET[&quot;order&quot;] == &#039;ASC&#039; ) : $Selected = &#039;selected=&quot;selected&quot;&#039;; endif; endif; ?&gt;\n      &lt;option value=&quot;&lt;?php echo add_query_arg( array( &#039;meta_key&#039; =&gt; &#039;ratings_average&#039; , &#039;order&#039; =&gt; &#039;ASC&#039; , &quot;s&quot; =&gt; get_query_var(&#039;s&#039;) ), $uri ); ?&gt;&quot; &lt;?php echo $Selected ?&gt;&gt;\u8a55\u4fa1\u306e\u4f4e\u3044\u9806\uff08\u5e73\u5747\uff09&lt;\/option&gt;\n\n      &lt;?php $Selected = &#039;&#039;; if( !empty( $_GET[&quot;meta_key&quot;] ) &amp;&amp; !empty( $_GET[&quot;order&quot;] ) ) : if( $_GET[&quot;meta_key&quot;] == &#039;ratings_score&#039; &amp;&amp; $_GET[&quot;order&quot;] == &#039;DESC&#039; ) : $Selected = &#039;selected=&quot;selected&quot;&#039;; endif; endif; ?&gt;\n      &lt;option value=&quot;&lt;?php echo add_query_arg( array( &#039;meta_key&#039; =&gt; &#039;ratings_score&#039; , &#039;order&#039; =&gt; &#039;DESC&#039; , &quot;s&quot; =&gt; get_query_var(&#039;s&#039;) ), $uri ); ?&gt;&quot; &lt;?php echo $Selected ?&gt;&gt;\u8a55\u4fa1\u306e\u9ad8\u3044\u9806\uff08\u7dcf\u5408\uff09&lt;\/option&gt;\n\n      &lt;?php $Selected = &#039;&#039;; if( !empty( $_GET[&quot;meta_key&quot;] ) &amp;&amp; !empty( $_GET[&quot;order&quot;] ) ) : if( $_GET[&quot;meta_key&quot;] == &#039;ratings_score&#039; &amp;&amp; $_GET[&quot;order&quot;] == &#039;ASC&#039; ) : $Selected = &#039;selected=&quot;selected&quot;&#039;; endif; endif; ?&gt;\n      &lt;option value=&quot;&lt;?php echo add_query_arg( array( &#039;meta_key&#039; =&gt; &#039;ratings_score&#039; , &#039;order&#039; =&gt; &#039;ASC&#039; , &quot;s&quot; =&gt; get_query_var(&#039;s&#039;) ), $uri ); ?&gt;&quot; &lt;?php echo $Selected ?&gt;&gt;\u8a55\u4fa1\u306e\u4f4e\u3044\u9806\uff08\u7dcf\u5408\uff09&lt;\/option&gt;  \n\n      &lt;?php $Selected = &#039;&#039;; if( !empty( $_GET[&quot;meta_key&quot;] ) &amp;&amp; !empty( $_GET[&quot;order&quot;] ) ) : if( $_GET[&quot;meta_key&quot;] == &#039;ratings_users&#039; &amp;&amp; $_GET[&quot;order&quot;] == &#039;DESC&#039; ) : $Selected = &#039;selected=&quot;selected&quot;&#039;; endif; endif; ?&gt;\n      &lt;option value=&quot;&lt;?php echo add_query_arg( array( &#039;meta_key&#039; =&gt; &#039;ratings_users&#039; , &#039;order&#039; =&gt; &#039;DESC&#039; , &quot;s&quot; =&gt; get_query_var(&#039;s&#039;) ), $uri ); ?&gt;&quot; &lt;?php echo $Selected ?&gt;&gt;\u8a55\u4fa1\u6570\u306e\u591a\u3044\u9806&lt;\/option&gt;\n\n      &lt;?php $Selected = &#039;&#039;; if( !empty( $_GET[&quot;meta_key&quot;] ) &amp;&amp; !empty( $_GET[&quot;order&quot;] ) ) : if( $_GET[&quot;meta_key&quot;] == &#039;ratings_users&#039; &amp;&amp; $_GET[&quot;order&quot;] == &#039;ASC&#039; ) : $Selected = &#039;selected=&quot;selected&quot;&#039;; endif; endif; ?&gt;\n      &lt;option value=&quot;&lt;?php echo add_query_arg( array( &#039;meta_key&#039; =&gt; &#039;ratings_users&#039; , &#039;order&#039; =&gt; &#039;ASC&#039; , &quot;s&quot; =&gt; get_query_var(&#039;s&#039;) ), $uri ); ?&gt;&quot; &lt;?php echo $Selected ?&gt;&gt;\u8a55\u4fa1\u6570\u306e\u5c11\u306a\u3044\u9806&lt;\/option&gt;\n\n      &lt;?php $Selected = &#039;&#039;; if( !empty( $_GET[&quot;orderby&quot;] ) &amp;&amp; !empty( $_GET[&quot;order&quot;] ) ) : if( $_GET[&quot;orderby&quot;] == &#039;comment_count&#039; &amp;&amp; $_GET[&quot;order&quot;] == &#039;DESC&#039; ) : $Selected = &#039;selected=&quot;selected&quot;&#039;; endif; endif; ?&gt;\n      &lt;option value=&quot;&lt;?php echo add_query_arg( array( &#039;orderby&#039; =&gt; &#039;comment_count&#039; , &#039;order&#039; =&gt; &#039;DESC&#039; , &quot;s&quot; =&gt; get_query_var(&#039;s&#039;) ), $uri ); ?&gt;&quot; &lt;?php echo $Selected ?&gt;&gt;\u30b3\u30e1\u30f3\u30c8\u6570\u306e\u591a\u3044\u9806&lt;\/option&gt;\n\n      &lt;?php $Selected = &#039;&#039;; if( !empty( $_GET[&quot;orderby&quot;] ) &amp;&amp; !empty( $_GET[&quot;order&quot;] ) ) : if( $_GET[&quot;orderby&quot;] == &#039;comment_count&#039; &amp;&amp; $_GET[&quot;order&quot;] == &#039;ASC&#039; ) : $Selected = &#039;selected=&quot;selected&quot;&#039;; endif; endif; ?&gt;\n      &lt;option value=&quot;&lt;?php echo add_query_arg( array( &#039;orderby&#039; =&gt; &#039;comment_count&#039; , &#039;order&#039; =&gt; &#039;ASC&#039; , &quot;s&quot; =&gt; get_query_var(&#039;s&#039;) ), $uri ); ?&gt;&quot; &lt;?php echo $Selected ?&gt;&gt;\u30b3\u30e1\u30f3\u30c8\u6570\u306e\u5c11\u306a\u3044\u9806&lt;\/option&gt;\n\n      &lt;?php $Selected = &#039;&#039;; if( !empty( $_GET[&quot;meta_key&quot;] ) &amp;&amp; !empty( $_GET[&quot;order&quot;] ) ) : if( $_GET[&quot;meta_key&quot;] == &#039;views&#039; &amp;&amp; $_GET[&quot;order&quot;] == &#039;DESC&#039; ) : $Selected = &#039;selected=&quot;selected&quot;&#039;; endif; endif; ?&gt;\n      &lt;option value=&quot;&lt;?php echo add_query_arg( array( &#039;meta_key&#039; =&gt; &#039;views&#039; , &#039;order&#039; =&gt; &#039;DESC&#039; , &quot;s&quot; =&gt; get_query_var(&#039;s&#039;) ), $uri ); ?&gt;&quot; &lt;?php echo $Selected ?&gt;&gt;\u95b2\u89a7\u6570\u306e\u591a\u3044\u9806&lt;\/option&gt;\n\n      &lt;?php $Selected = &#039;&#039;; if( !empty( $_GET[&quot;meta_key&quot;] ) &amp;&amp; !empty( $_GET[&quot;order&quot;] ) ) : if( $_GET[&quot;meta_key&quot;] == &#039;views&#039; &amp;&amp; $_GET[&quot;order&quot;] == &#039;ASC&#039; ) : $Selected = &#039;selected=&quot;selected&quot;&#039;; endif; endif; ?&gt;\n      &lt;option value=&quot;&lt;?php echo add_query_arg( array( &#039;meta_key&#039; =&gt; &#039;views&#039; , &#039;order&#039; =&gt; &#039;ASC&#039; , &quot;s&quot; =&gt; get_query_var(&#039;s&#039;) ), $uri ); ?&gt;&quot; &lt;?php echo $Selected ?&gt;&gt;\u95b2\u89a7\u6570\u306e\u5c11\u306a\u3044\u9806&lt;\/option&gt;\n\n      &lt;?php $Selected = &#039;&#039;; if( !empty( $_GET[&quot;orderby&quot;] ) &amp;&amp; !empty( $_GET[&quot;order&quot;] ) ) : if( $_GET[&quot;orderby&quot;] == &#039;author&#039; &amp;&amp; $_GET[&quot;order&quot;] == &#039;ASC&#039; ) : $Selected = &#039;selected=&quot;selected&quot;&#039;; endif; endif; ?&gt;\n      &lt;option value=&quot;&lt;?php echo add_query_arg( array( &#039;orderby&#039; =&gt; &#039;author&#039; , &#039;order&#039; =&gt; &#039;ASC&#039; , &quot;s&quot; =&gt; get_query_var(&#039;s&#039;) ), $uri ); ?&gt;&quot; &lt;?php echo $Selected ?&gt;&gt;\u6295\u7a3f\u8005\u9806(\uff21\uff5e\uff3a\u30fb\u3042\uff5e\u308f)&lt;\/option&gt;\n\n      &lt;?php $Selected = &#039;&#039;; if( !empty( $_GET[&quot;orderby&quot;] ) &amp;&amp; !empty( $_GET[&quot;order&quot;] ) ) : if( $_GET[&quot;orderby&quot;] == &#039;author&#039; &amp;&amp; $_GET[&quot;order&quot;] == &#039;DESC&#039; ) : $Selected = &#039;selected=&quot;selected&quot;&#039;; endif; endif; ?&gt;\n      &lt;option value=&quot;&lt;?php echo add_query_arg( array( &#039;orderby&#039; =&gt; &#039;author&#039; , &#039;order&#039; =&gt; &#039;DESC&#039; , &quot;s&quot; =&gt; get_query_var(&#039;s&#039;) ), $uri ); ?&gt;&quot; &lt;?php echo $Selected ?&gt;&gt;\u6295\u7a3f\u8005\u9806\uff08\u308f\uff5e\u3042\u30fb\uff3a\uff5e\uff21\uff09&lt;\/option&gt;  \n\n    &lt;\/select&gt;\n        &lt;\/div&gt;   \n\n    &lt;?php\n    \/\/ \u4f55\u306e\u6307\u5b9a\u3082\u306a\u3044\u3068\u304d\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30bd\u30fc\u30c8\u9806\n\t$paged = get_query_var( &#039;paged&#039; );\n\tif( empty( $paged ) ) {\n\t\t$paged = 0;\n\t}\n    $args = array( &#039;posts_per_page&#039; =&gt; get_option(&#039;posts_per_page&#039;) , &#039;orderby&#039; =&gt; &#039;date&#039; , &#039;order&#039; =&gt; &#039;DESC&#039; , &#039;paged&#039; =&gt; $paged );\n\n    if( is_category() ) {\n      $args[&quot;cat&quot;] = get_query_var( &quot;cat&quot; );\n    } elseif( is_tag() ) {\n      $args[&quot;tag&quot;] = get_query_var( &quot;tag&quot; );\n    }\n    $taxonomy = get_query_var( &quot;taxonomy&quot; );\n    if( !empty( $taxonomy ) ) {\n      $args[$taxonomy] = get_query_var( &quot;term&quot; );\n    }\n    $args[&quot;s&quot;] = get_query_var( &quot;s&quot; );\n\n    if( !empty( $_GET[&quot;meta_key&quot;] ) ) {\n      $args[&quot;meta_key&quot;] = strip_tags( $_GET[&quot;meta_key&quot;] );\n      $args[&quot;orderby&quot;] = &#039;meta_value_num&#039;;\n      } elseif( !empty( $_GET[&quot;orderby&quot;] ) ) {\n      $args[&quot;orderby&quot;] = strip_tags( $_GET[&quot;orderby&quot;] );\n      unset( $args[&quot;meta_key&quot;] );\n\n    }\n\n    if( !empty( $_GET[&quot;order&quot;] ) ) {\n      $args[&quot;order&quot;] = strip_tags( $_GET[&quot;order&quot;] );\n    }\n    ?&gt;\n\n    &lt;?php query_posts( $args ); ?&gt;\n\t&lt;pre&gt;&lt;?php print_r($args); ?&gt;&lt;\/pre&gt;\n\n\t&lt;section id=&quot;primary&quot; class=&quot;site-content&quot;&gt;\n\t\t&lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;\n\n\t\t&lt;?php if ( have_posts() ) : ?&gt;\n\n\t\t\t&lt;header class=&quot;page-header&quot;&gt;\n\t\t\t\t&lt;h1 class=&quot;page-title&quot;&gt;&lt;?php printf( __( &#039;Search Results for: %s&#039;, &#039;twentytwelve&#039; ), &#039;&lt;span&gt;&#039; . get_search_query() . &#039;&lt;\/span&gt;&#039; ); ?&gt;&lt;\/h1&gt;\n\t\t\t&lt;\/header&gt;\n\n\t\t\t&lt;?php twentytwelve_content_nav( &#039;nav-above&#039; ); ?&gt;\n\n\t\t\t&lt;?php \/* Start the Loop *\/ ?&gt;\n\t\t\t&lt;?php while ( have_posts() ) : the_post(); ?&gt;\n\t\t\t\t&lt;?php get_template_part( &#039;content&#039;, get_post_format() ); ?&gt;\n\t\t\t&lt;?php endwhile; ?&gt;\n\n\t\t\t&lt;?php twentytwelve_content_nav( &#039;nav-below&#039; ); ?&gt;\n\n\t\t&lt;?php else : ?&gt;\n\n\t\t\t&lt;article id=&quot;post-0&quot; class=&quot;post no-results not-found&quot;&gt;\n\t\t\t\t&lt;header class=&quot;entry-header&quot;&gt;\n\t\t\t\t\t&lt;h1 class=&quot;entry-title&quot;&gt;&lt;?php _e( &#039;Nothing Found&#039;, &#039;twentytwelve&#039; ); ?&gt;&lt;\/h1&gt;\n\t\t\t\t&lt;\/header&gt;\n\n\t\t\t\t&lt;div class=&quot;entry-content&quot;&gt;\n\t\t\t\t\t&lt;p&gt;&lt;?php _e( &#039;Sorry, but nothing matched your search criteria. Please try again with some different keywords.&#039;, &#039;twentytwelve&#039; ); ?&gt;&lt;\/p&gt;\n\t\t\t\t\t&lt;?php get_search_form(); ?&gt;\n\t\t\t\t&lt;\/div&gt;&lt;!-- .entry-content --&gt;\n\t\t\t&lt;\/article&gt;&lt;!-- #post-0 --&gt;\n\n\t\t&lt;?php endif; ?&gt;\n\n\t\t&lt;\/div&gt;&lt;!-- #content --&gt;\n\t&lt;\/section&gt;&lt;!-- #primary --&gt;\n\n&lt;?php get_sidebar(); ?&gt;\n&lt;?php get_footer(); ?&gt;<\/code><\/pre>\n<p>\u5927\u5909\u4f7f\u3044\u3084\u3059\u304f\u3001\u91cd\u5b9d\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u8abf\u3079\u3066\u3044\u3066\u308f\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001<br \/>\n\u6700\u8fd1\u306fquery_posts\u3067\u306f\u306a\u304f\u3001pre_get_posts\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u308b<br \/>\n\u3068\u3044\u3046\u3053\u3068\u3067\u3057\u305f\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u81ea\u5206\u3067\u3044\u308d\u3044\u308d\u3068\u8abf\u3079\u305f\u306e\u3067\u3059\u304c\u3001<br \/>\n\u63a8\u5968\u3068\u975e\u63a8\u5968\u306e\u8a71\u304c\u591a\u304f\u3001\u5177\u4f53\u7684\u306b\u3069\u306e\u3088\u3046\u306b\u3059\u308c\u3070\u3044\u3044\u306e\u304b\u304c<br \/>\n\u5206\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u4e0a\u306b\u8a18\u8f09\u3057\u307e\u3057\u305f\u30b3\u30fc\u30c9\u3092\u4f8b\u306b\u3057\u3066\u3001<br \/>\nquery_posts\u3067\u306f\u306a\u304f\u3001pre_get_posts\u306e\u5834\u5408\u306f\u3069\u3046\u306a\u306e\u304b\u3001<br \/>\n\u5177\u4f53\u7684\u306b\u3059\u308b\u3068\u3069\u306e\u3088\u3046\u306b\u306a\u308b\u306e\u304b\u3001\u3068\u3044\u3046\u3053\u3068\u3092<br \/>\n\u6559\u3048\u3066\u3044\u305f\u3060\u304d\u305f\u3044\u3068\u601d\u3044\u3001\u4eca\u56de\u30c8\u30d4\u30c3\u30af\u3092\u305f\u3066\u307e\u3057\u305f\u3002<\/p>\n<p>\u8ff7\u60d1\u304b\u3082\u3057\u308c\u306a\u3044\u3067\u3059\u304c\u3001\u5206\u304b\u308b\u65b9\u3001\u304a\u9858\u3044\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"template":"","class_list":["post-162160","topic","type-topic","status-closed","hentry","topic-tag-16600","topic-tag-14122","topic-tag-15018","topic-tag-pre_get_posts"],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/162160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/162160\/revisions"}],"wp:attachment":[{"href":"https:\/\/ja.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=162160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}