Retrieving values of custom fields in Advanced custom field plugin


// check if the repeater field has rows of data
if( have_rows('subevent') ):
        // loop through the rows of data
        while ( have_rows('subevent') ) : the_row();
                // display a sub field value
                echo '<br/><h6>';
                the_sub_field('subevent_title');
                echo '</h6>';
                the_sub_field('subevent_description');
        endwhile;
else :
        // no rows found
endif;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s