Skip to:
Content
Pages
Categories
Search
Top
Bottom

Delete profile fields


  • mattrichard
    Participant

    @mattrichard

    Hi !

    I found a lot of topics and articles about how to add fields to a profile, but not how to delete some. When I installed by theme and buddy press, on profiles there are some fields like “quotes”, “media” etc that I want to delete.

    Is there a way to do this ?

    Thanks for your help !!

    Matthias

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

  • Henry Wright
    Moderator

    @henrywright

    To delete a profile field group, you can use xprofile_delete_field_group(). The function accepts the ID of the field group you wish to delete.

    To delete a specific field, you can use xprofile_delete_field(). This function accepts the ID of the field you wish to delete.


    mattrichard
    Participant

    @mattrichard

    Thanks !

    I have to put in in my function.php file ? Is there a specific place ?


    mattrichard
    Participant

    @mattrichard

    And where can I find the iDs of the fields ?


    Henry Wright
    Moderator

    @henrywright

    You could put it in your functions.php file, or even your bp-custom.php file if you have one. It only needs to be run once so make sure you remove it after visiting your website in a web browser.

    Finding the group ID or the field ID is something you’ll need to do yourself. Take a look in your database and find table bp_xprofile_fields. Then look for the id column and the name column. Say the name of the field you want to delete is ‘Social’. Just look for ‘Social’ in the name column and find the id of that particular row. Then you have your field ID.


    shanebp
    Moderator

    @shanebp

    You can get the ids by going to .../wp-admin/users.php?page=bp-profile-setup
    Click or roll-over the Edit links for group or single field.
    And you’ll see group_id & field_id.
    btw – you can delete groups and / or single fields on that wp-admin page.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Delete profile fields’ is closed to new replies.
Skip to toolbar