I am using the Advanced Custom Fields plugin to give Custom Post Types a checkbox. If this box is checked, it should be returned by this Query. The Query works this far.
The pages I want it to display are all childs of a page. And this Query returns all pages with the checkbox, instead of just the childs of the current page with the checkbox.
top of page
<?php $tid = get_the_ID(); ?>
Further along the page
<?php $i == 0; global $post; $myposts = new WP_Query(array( 'post_type' => 'keuringen', 'child_of' => $tid, 'meta_query' => array( array( 'key' => 'first_to_load', 'value' => '1', 'compare' => '==' ) ) )); ?>
The question What can I do to make it return only the children? Or should this already return only the children and is this a bug in one of the plugins?