Could you elaborate? Currently this is an already built in function in Buddypress.
Go to your wordpress dashboard followed by clicking on Users > Profile fields > click on the button called “Add new field group” and you got a new tab you can fill out with profile fields.
Thanks for replying! I am able to add new field sets to the profile. They are displayed in a long list instead of broken up by tabs.
If you’re looking at this screenshot: https://drive.google.com/file/d/1hgBbI3Za688UzVbl5cC9L5OjKboMVV5z/view?usp=sharing
Ideally, there would be tabs under the “View Profile” text for “Bio” and “Test Field Set”. When you clicked on the tab, it would display the info associated with that field set.
There’s an old plugin that appears to do this (https://wordpress.org/plugins/buddypress-profile-tabs/), but I am concerned about its stability and wondering if there is another option.
Thank you for any guidance!
Bumping in case anyone has any ideas.
I see now. From looking at the plugin code it could use some cleaning up, although its still fine to use.
If you’d like to have more control, and you know how to code, you could override the buddypress/members/single/profile/profile-loop.php
(in BP Nouveau) and create a loop with tabs instead.
It should be easily doable with js modifications or using pure CSS using radio inputs.
Here’s an example – use the js from something like https://codepen.io/liav80/pen/KzpWzy and alter the loop in profile-loop.php (as an example) to be
<?php if ( bp_has_profile() ) : ?>
<div id="wrapper">
<?php
while ( bp_profile_groups() ) :
bp_the_profile_group();
?>
<?php if ( bp_profile_group_has_fields() ) : ?>
<?php bp_nouveau_xprofile_hook( 'before', 'field_content' ); ?>
<?php
while ( bp_profile_fields() ) :
bp_the_profile_field();
?>
<?php if ( bp_field_has_data() ) : ?>
<div data-tabname="<?php bp_the_profile_field_name(); ?>">
<div class="tabs-inner"><?php bp_the_profile_field_value(); ?></div>
</div>
<?php endif; ?>
<?php bp_nouveau_xprofile_hook( '', 'field_item' ); ?>
<?php endwhile; ?>
<?php bp_nouveau_xprofile_hook( 'after', 'field_content' ); ?>
<?php endif; ?>
<?php endwhile; ?>
<?php bp_nouveau_xprofile_hook( '', 'field_buttons' ); ?>
</div>
<?php endif; ?>
It should give you a start to change things from there.
Thank you @clickallco! I will look into your recommendations and see if I can’t get this figured out. I really appreciate you taking the time to respond!