Output ACF repeater on frontend user’s profile page (created with Ultimate Member)

Question

I’m using Ultimate Member plugin to manage my user directory. I also use Advanced Custom Fields to create some custom fields on the backend of the user’s profile page (location: user form > equal > add/edit) which I want to output via shortcode on the profile page of the current user.

This is what I tried:

function acf_repeater() {

um_fetch_user( get_current_user_id() ); {

  if( have_rows('repeater_name') ):

    while ( have_rows('repeater_name') ) : the_row();

      the_sub_field('subfield_name');

    endwhile;

  else :

  endif;
  } 
}

add_shortcode('acf_repeater_shortcode', 'acf_repeater');

but this doesn’t work. Any tips?

--------------------------------------------------

>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="https://www.wptricks.com/question/output-acf-repeater-on-frontend-users-profile-page-created-with-ultimate-member/">

Output ACF repeater on frontend user's profile page (created with Ultimate Member)</a>
0
, Chris Osiak 2 months 0 Answers 37 views 0

Leave an answer