Support

Account

Home Forums Add-ons Repeater Field Advanced Query

Unread

Advanced Query

  • Hi Guys, i have 3 custom post types, one called ‘festival’, the second one called ‘Festival Edition’ and t he 3rd one called ‘dj’

    Inside of the festival field is a repeater “Stage name” that has a relationshion in it that queries “dj”.

    Now on the on the single_dj.php the single dj page i want to query the festivals that the dj attend. i tried to querry but is not working.
    `$postimoirtant = get_the_title();
    $querryfestivals = array(
    ‘post_type’ => ‘festival’,
    ‘order’ => ‘DESC’,
    ‘posts_per_page’ => 10,
    ‘meta_query’ => array(
    array(
    ‘key’ => ‘stage_name’,
    ‘post_title’ => $postimoirtant,
    ‘compare’ => ‘LIKE’,
    ),
    ),
    );
    $fetivo_query = new WP_Query( $querryfestivals );
    if($fetivo_query)
    while ( $fetivo_query->have_posts() ) : $fetivo_query->the_post(); ?>
    <?php
    $festid = get_the_ID();
    ?>
    <h2 class=”hejoined”>@ “><?php the_title();?><span> on <?php echo the_date(); ?></span> </h2>
    <?php endwhile; wp_reset_postdata(); ?>

    It will Query, but it will query all the festivals that has at least one line in the Stage Name repeater.
    Please Help. or at least tell me what i am doing wrong.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.