Support

Account

Home Forums ACF PRO Huge subfields Query

Solved

Huge subfields Query

    • lupet

    • May 3, 2020 at 8:07 pm

    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?

    • lupet

    • January 22, 2021 at 8:03 pm

    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)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.