Home Forums Add-ons Repeater Field Cannot get the_sub_field value?


Cannot get the_sub_field value?

  • I’ve created a custom post type of Footer(s) and setup a range of custom fields for this type. I’ve created a repeater field (shortcuts) with a sub field of shortcut.

    Now I want the get the damn values.

    I get the field for the post by id, using:

    if ( have_rows('shortcuts', $footer_id) ) :

    And now my logic (after reading the docs) make me try this:

    	while ( have_rows('shortcuts') ) : the_row();
    		echo the_sub_field('shortcut');

    But – as usual I might add – I get nothing.

    What am I missing this time?

    I’m outside the loop using get_post( 83 );

  • Well, missed the $footer_id in the while loop …

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

The topic ‘Cannot get the_sub_field value?’ is closed to new replies.