mysql - Query posts custom field: check list inside a ACF repeater -


i'm trying query posts have specific check box selected inside repeater field.

i found tutorial , want mix of topic 3 , 4, couldn't accomplish self, first attempt query posts , print 1 checked item:

<?php  // check if repeater field has rows of data if( have_rows('horarios') ):      // loop through rows of data     while ( have_rows('horarios') ) : the_row();          $dia_da_semana = get_sub_field_object( 'dia_da_semana' );         $horario = get_sub_field_object( 'horario' );          if ( in_array(1, $dia_da_semana['value'])) {             echo 'segunda';             print_r( $horario['value']);             echo '<br>';         }      endwhile;  endif;  ?>   

but don't think solution. maybe there better way achieve i'm trying do.


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -