BuddyDev

Search

[Resolved] Group name of field

Tagged: 

  • Participant
    Level: Initiated
    Posts: 6
    mekcas on #26183

    Hi. I am currently using Buddypress version Version 5.0.0 with wordpress version 5.2. my current theme is twenty nineteen. the issues was, I created a different profile group name:
    group 1: Base(Primary)
    group 2: Section A
    group 3: Section B

    I try to makes all field appear in one page and it’s appear but the group name does not appear. only field name that appear. how can I make the field group name appear?

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #26185

    Hi,
    Welcome to BuddyDev.

    Please take a look at this file
    https://github.com/buddypress/BuddyPress/blob/master/src/bp-templates/bp-legacy/buddypress/members/single/profile/profile-loop.php

    It should give you the idea how to show the group name.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 6
    mekcas on #26188

    Hi. thank you for your reply. Can I implement this code https://github.com/buddypress/BuddyPress/blob/master/src/bp-templates/bp-legacy/buddypress/members/single/profile/profile-loop.php in register page?

    Sorry, I am beginner in wp and buddypress

  • Participant
    Level: Initiated
    Posts: 6
    mekcas on #26189

    Can someone help me? I want to make group name appear in my register page. I have implement this code in register page:

    <?php

    $args = array(‘profile_group_id’ => $current_profile_group_id);
    $data_groups = BP_XProfile_Group::get( $args );
    echo ‘<h1>’.$data_groups[0]->name.'</h1>’;
    ?>

    but only ‘Base’ name appear at all field.

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #26200

    Please share complete code. registration page has some restrictions and without seeing your complete code, I am unable to assist.

    PS:- Please use pastebin to share the code.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 6
    mekcas on #26201

    Hi. Thanks for your reply. this is my code: https://pastebin.com/LhpqFSTh

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #26202

    Thank you for sharing.

    you have not specified the value of $current_profile_group_id and that’s why you are not getting the desired result. you must specify a group id.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: resolved