Notifications
Clear all

wpForo 1.x.x Way to Disable 'Website' and 'About Me' Column in Account?

2 Posts
2 Users
1 Likes
1,737 Views
kyotomizuko
Posts: 18
Topic starter
(@kyotomizuko)
Active Member
Joined: 4 years ago

Anyway to remove or disable 'website' and 'about me' column in account?

1 Reply
Robert
Posts: 9912
Admin
(@robert)
Support Team
Joined: 7 years ago

Hi @kyotomizuko,

You can disable the Website and About Me fields using this script:

function my_custom_wpforo_account_fields( $fields ){
    $remove_fields = array('site', 'about');
    if( !empty($fields) ){
        foreach( $fields as $r => $rows ){
            foreach( $rows as $c => $cols ){
                foreach( $cols as $f => $field ){
                    if( $field && in_array($field, $remove_fields) ){
                        unset($fields[$r][$c][$f]);
                    }
                }
            }
        }
    }
    return $fields;
}
add_filter( 'wpforo_get_account_fields', 'my_custom_wpforo_account_fields');

Put this code in current active WordPress theme functions.php file.

How to Easily Add Custom Code in WordPress (without Breaking Your Site)

Reply