Saturday, January 21, 2023
HomeWordPress DevelopmentWp question + acf fields repeater get submit per subject in acf

Wp question + acf fields repeater get submit per subject in acf


I’m in search of options.
the place the wp question return me (double submit/row) e.g. two posts when question discover two worth in ACF repeater in a single wp submit. And comparable return 3 row when discover one submit with e.g. 3 acf subject worth

That is my question

// args
$datetoday=(date('Y-m-d')); 

// filter
operate my_posts_where( $the place ) {
    
   $the place = str_replace("meta_key = 'data_emisji_$", "meta_key LIKE 'data_emisji_%", $the place);

   return $the place;
}

add_filter('posts_where', 'my_posts_where');
$args = array(
    'numberposts'   => -1,
    'post_type'     => 'movie',
    'meta_key'      => 'data_emisji_$_data_i_godzina',   
    'meta_query'    => array(      
      'data-order_by-acf' => array(
          'key'       => 'data_emisji_$_data_i_godzina',
          'evaluate'   => 'like',
          'worth'     => $datetoday,
          )     
      ),
      'orderby' => array( 'data-order_by-acf' => 'ASC' ),   
);

// question
$the_query = new WP_Query( $args );

Code work good however return one row (one submit) when discover worth (multiply) in acf subject.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments