Support

Account

Home Forums ACF PRO Huge subfields Query

Solved

Huge subfields Query

  • Hi, I’ve a very big query that use also subfield of repeater field.

    
    if(isset($rarita) && $rarita) {
    $query_args['meta_query'][] = array('relation' => 'OR', array('key' => 'scheda_dettagli_%_rarità', 'value' => $rarita, 'compare' => '='), array('key' => 'scheda_dettagli_titoli_azionari_%_rarità', 'value' => $rarita, 'compare' => '='));
    } 
    
    if(isset($valore) && $valore) {
    $query_args['meta_query'][] = array('relation' => 'OR', array('key' => 'scheda_dettagli_%_valore', 'value' => $valore, 'compare' => '='), array('key' => 'scheda_dettagli_titoli_azionari_%_valore', 'value' => $valore, 'compare' => '='));
    } 

    Many time it fail, there is a way to streamline it?

    I use already

    'fields'         => 'ids',
    'paged'          => $paged,
    'update_post_term_cache' => false,
    'update_post_meta_cache' => false

    You have any ideas?

  • Best solution for me, copy repeater on a single text field and use it for query.

    More info: https://support.advancedcustomfields.com/forums/topic/copy-all-repeater-subfields-to-meta-key/

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Huge subfields Query’ is closed to new replies.