Support

Account

Home Forums General Issues Creating additonal user profile fields

Solving

Creating additonal user profile fields

  • Hi everyone,
    I’m new to this plugin and I’m trying to add some extra fields to the user profile in wp-admin. I managed to create the fields and set the location rules to show up on a post or page, but can’t seem to target the user profile page at all.
    I’m not sure if I need to add some code to functions.php to get it to work. Can someone please point me in the right direction?

    Thanks!

  • Hi,

    You could do this :

    <?php
    acf_form_head();
    get_header();
    $userID = get_current_user_id();
    if (have_posts()) : while (have_posts()) : the_post(); ?>
    $options = array(
    												'field_groups' => array('your_field_group'),
    												'post_id' => 'user_'.$userID,
    												'updated_message' => __('Profil updated','your_namespace'),								);
    acf_form($options);
    
    get_footer();
    ?>
  • Hi @inlinelogic

    There are location rules for placing fields on a user or user role 🙂

    Check for “Current User” or “Current User role” in the location rules dropdown.

  • It’s so obvious that I thought he was talking about fronted…

  • He’s saying wp-admin so I assume he means backend 🙂

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

The topic ‘Creating additonal user profile fields’ is closed to new replies.