Support

Account

Home Forums Add-ons Repeater Field Pulling in single data Reply To: Pulling in single data

  • Hi @antsykes95

    In this case, I think you can modify the code I gave you before to something like this:

    // this data is retrieved dynamically
    $current_dj = "current dj name";
    
    $repeater_value = get_field('presenter_list', 'option');
    
    foreach( $repeater_value as $row ){
        if( $row['presenter_name'] == $current_dj ){
            echo $row['presenter_bio'];
            echo $row['presenter_image'];
        }
    }

    But just as you said, I believe the best way to achieve it is by using a custom post type instead.

    I hope this makes sense 🙂