WP Query close, but no cigar!
-
For a home page I am trying to implement a carousel that shows the post_thumbs of several grandchild-pages. These grandchild-pages belong to a total of 6 parent pages and these have 1 grandparent.
I do not want to show the thumbnail of the grandparent nor of any of the other pages (siblings of the grandparent).I have tried to run a query as shown in the codex (https://codex.www.ads-software.com/Template_Tags/query_posts#Post_.26_Page_Parameters) using ‘post_parent’ => array(51,53,54,55,56,57) , but if I do that it shows a whole bunch of other pages too.
I got it working now by also using ‘post__not_in’ => array(), but obviously that is not the best solution as every time a new page gets added, I have to go back to that file…
I don’t know if it helps, but I am also using these parameters in the same query:
‘post_type’=> ‘page’,
‘posts_per_page’ => -1,
‘orderby’=> ‘menu_order’,
‘order’=> ‘ASC’,What am I doing wrong?
- The topic ‘WP Query close, but no cigar!’ is closed to new replies.