Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Get the selected options
- // $my_acf_checkbox_field_arr = get_field('jobs_all');
- // // Build the meta query based on the selected options
- // $meta_query = array('relation' => 'OR');
- // foreach( $my_acf_checkbox_field_arr as $item ){
- // $meta_query[] = array(
- // 'value' => $item,
- // 'compare' => 'IN',
- // 'location_job' => 'מרכז'
- // );
- // }
- // // args
- // $args = array(
- // 'numberposts' => -1,
- // 'post_type' => 'my-cpt',
- // 'meta_query' => $meta_query,
- // );
- // $the_query = new WP_Query( $args );
- // print_r($the_query);
- $my_acf_checkbox_field_arr = get_field('jobs_all');
- wp_reset_postdata();
- foreach( $my_acf_checkbox_field_arr as $item ){
- $myargs = array (
- 'value' => $item,
- 'showposts' => 0,
- 'meta_key' => 'location_job',
- 'meta_value' => 'צפון'
- );
- }
- $myquery = new WP_Query($myargs);
- print_r($myquery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement