{"id":2434119,"date":"2011-12-07T03:46:37","date_gmt":"2011-12-07T03:46:37","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/query-page-using-include-didnt-work\/"},"modified":"2016-08-20T03:44:22","modified_gmt":"2016-08-20T03:44:22","slug":"query-page-using-include-didnt-work","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/query-page-using-include-didnt-work\/","title":{"rendered":"query page using include didnt work"},"content":{"rendered":"<p>hello friend<br \/>\nright now i need to fecth only 4 page post in my wordpress site, this 4 page is only show at the footer as 4 coulumn with thumbnail exist. So every page open, this 4 coulumn should still remain to display that 4 page.<\/p>\n<p>i have try using query_posts like this<\/p>\n<pre><code>&lt;?php\n\t\t\t$args = Array(\n\t\t\t\t&#039;posts_per_page&#039;=&gt;4,\n\t\t\t\t&#039;post_type&#039;\t=&gt;&#039;page&#039;,\n\t\t\t\t&#039;include&#039; =&gt; 32,30,28,34,\n\t\t\t\t);?&gt;\n\t\t\t&lt;?php query_posts($args); ?&gt;\n\t\t\t&lt;?php if (have_posts()) while (have_posts()) : the_post(); ?&gt;\n\t\t\t\t&lt;div class=&quot;b4&quot;&gt;\n\t\t\t\t&lt;h2 class=&quot;h_bot&quot;&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;?php the_title();?&gt;&lt;\/a&gt;&lt;\/h2&gt;\n\t\t\t\t&lt;div class=&quot;b4_thumb&quot;&gt;&lt;?php get_the_image( array( &#039;meta_key&#039; =&gt; array( &#039;Thumbnail&#039;, &#039;thumbnail&#039; ), &#039;size&#039; =&gt; &#039;medium&#039; ) ); ?&gt;&lt;\/div&gt;\n\t\t\t\t&lt;p&gt;&lt;?php the_excerpt(); ?&gt;&lt;\/p&gt;\n\t\t\t\t&lt;\/div&gt;\n\n\t\t\t&lt;?php endwhile;wp_reset_query();?&gt;<\/code><\/pre>\n<p>the result was fine, i can get 4 page but the problem its only show the latest page :(, so everytime there is new page created, the new page will show on the footer, seems i&#8217;m missing something on &#8220;include&#8221; parameter ,<br \/>\nany idea how to using include for the spefific page id : &#8216;include&#8217; =&gt; 32,30,28,34,<\/p>\n<p>thanks<\/p>\n","protected":false},"template":"","class_list":["post-2434119","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/2434119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/2434119\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=2434119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}