Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hide the whole Base profile field group


  • maelga
    Participant

    @maelga

    Hi,

    Is it possible to hide the whole Base profile field group?
    Neither viewable, nor editable by users.

    I have found a number of topics re this, but answers only cover how to hide individual fields and not the whole group.

    Thank you

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

  • shanebp
    Moderator

    @shanebp

    Are there other profile groups that you want to be visible and editable?


    maelga
    Participant

    @maelga

    Yes, a few other profile groups should be visible and editable.

    So I guess hiding the whole group 1 requires a redirect to another group id.
    I have seen (very) old topics on this and tried some code but it does not seem to work with newer BP versions.

    Appreciate your help 🙂


    maelga
    Participant

    @maelga

    Hi @shanebp, would you have any input for this?


    shanebp
    Moderator

    @shanebp

    Try this…

    Make a template overload of this file:
    bp-templates\bp-legacy\buddypress\members\single\profile\profile-loop.php

    In that new file, change this:
    <?php while ( bp_profile_groups() ) : bp_the_profile_group(); ?>

    to this, assuming the id of your base group is 1

    <?php while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
        <?php if( bp_get_the_profile_group_id() != 1 ) : ?>

    And add an <?php endif; ?> before the <?php endwhile; ?> near the bottom of the page.

    Do the same for:
    bp-templates\bp-legacy\buddypress\members\single\profile\edit.php


    maelga
    Participant

    @maelga

    That’s clever. Thanks @shanebp

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Hide the whole Base profile field group’ is closed to new replies.
Skip to toolbar