This topic has 6 replies, 2 voices, and was last updated 10 years by nusolutions.
-
Author
-
April 15, 2014 at 07:48 #15135nusolutionsParticipant
Still trying to get extra tabs added next to my member profiles. So I come across this thread:
https://archived.seventhqueen.com/forums/topic/how-to-add-more-tabs-next-to-the-profile-image
I make sure the Base profile is named accordingly.
The child theme is activated.
I’m logged in as a user who has answered some of the questions in their profile.I don’t see any new tabs. Are there any steps which should be taken beforehand? I have the following in my \sweetdate-child\functions.php file:
<?php
/**
* @package WordPress
* @subpackage Sweetdate
* @author SeventhQueen <themesupport@seventhqueen.com>
* @since Sweetdate 1.0
*//**
* Sweetdate Child Theme Functions
* Add extra code or replace existing functions
*///my changes to profile tabs
add_action(‘after_setup_theme’,’kleo_my_custom_tabs’);
function kleo_my_custom_tabs()
{
global $bp_tabs;
$bp_tabs = array();
$bp_tabs[‘searching-for’] = array(
‘type’ => ‘cite’,
‘name’ => __(‘Searching for’, ‘kleo_framework’),
‘group’ => ‘Searching for’,
‘class’ => ‘citetab’
);$bp_tabs[‘base’] = array(
‘type’ => ‘regular’,
‘name’ => __(‘About me’, ‘kleo_framework’),
‘group’ => ‘Base’,
‘class’ => ‘regulartab’
);/* rtMedia tab – only if plugin installed */
if (class_exists(‘RTMedia’))
{
$bp_tabs[‘rtmedia’] = array(
‘type’ => ‘rt_media’,
‘name’ => __(‘My work’, ‘kleo_framework’),
‘class’ => ‘mySlider’
);
}/* Bp-Album tab – only if plugin installed */
elseif (function_exists(‘bpa_init’)) {
$bp_tabs[‘bp-album’] = array(
‘type’ => ‘bp_album’,
‘name’ => __(‘My photos’, ‘kleo_framework’),
‘class’ => ‘mySlider’
);
}$bp_tabs[‘social’] = array(
‘type’ => ‘regular’,
‘name’ => __(‘Social’, ‘kleo_framework’),
‘class’ => ‘regulartab’
);
}?>
Any responses appreciated.
April 16, 2014 at 01:33 #15217AbeKeymasterYour group names from Users – Profile fields should match the defined ‘group’ => ‘Base’,
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.April 16, 2014 at 01:33 #15218AbeKeymasteror ‘group’ => ‘Searching for’, and so on
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.June 5, 2014 at 15:07 #19372nusolutionsParticipantBack on this project and I’m still the one kid sitting in the back of the class with his hands up trying to figure it out.
After having to rebuild the site I’m back to the basics in customizing it. The results are the same for me in that I don’t see any changes or additions to the profile after adding this code to the child/functions.php file. Base is the name of the default profile.Again, what am I missing?
Any chance of this becoming an update added the a future release?Any responses appreciated.
June 6, 2014 at 00:58 #19409nusolutionsParticipantIn addition I create the following Field Groups
Base
Looking for
About me
My photos
SocialI have RTMedia installed and activated. Nothing.
I try the other suggestion:
1. Delete all profile fields/tabs except Base.
2. Create new Test & More profile fields.
3. Add this code to sweetdate-child/functions.phpCOPY CODE<?php /** * @package WordPress * @subpackage Sweetdate * @author SeventhQueen <themesupport@seventhqueen.com> * @since Sweetdate 1.0 */ /** * Sweetdate Child Theme Functions * Add extra code or replace existing functions */ add_action(‘after_setup_theme’,’kleo_my_actions’); function kleo_my_actions() { global $bp_tabs; $bp_tabs['more'] = array( ‘type’ => ‘regular’, ‘name’ => __(‘More’, ‘kleo_framework’), ‘class’ => ‘regulartab’ ); $bp_tabs['test'] = array( ‘type’ => ‘regular’, ‘name’ => __(‘Test’, ‘kleo_framework’), ‘class’ => ‘regulartab’ ); } ?>
4. Add info to fields in each tab.
When viewing the profile I can see the fields below but nothing changes up top in the member profile area.
Not getting it!!!!
June 10, 2014 at 15:49 #19625AbeKeymasterHi, this should be the code with the Base, More and Test profile group name as they should be defined in Users – Profile fields
COPY CODEadd_action('after_setup_theme','kleo_my_custom_tabs'); function kleo_my_custom_tabs() { global $bp_tabs; $bp_tabs = array(); $bp_tabs['base'] = array( 'type' => 'regular', 'name' => "Base", 'group' => 'Base', 'class' => 'regulartab' ); /* rtMedia tab - only if plugin installed */ if (class_exists('RTMedia')) { $bp_tabs['rtmedia'] = array( 'type' => 'rt_media', 'name' => __('My work', 'kleo_framework'), 'class' => 'mySlider' ); } /* Bp-Album tab - only if plugin installed */ elseif (function_exists('bpa_init')) { $bp_tabs['bp-album'] = array( 'type' => 'bp_album', 'name' => __('My photos', 'kleo_framework'), 'class' => 'mySlider' ); } $bp_tabs[] = array( 'type' => 'regular', 'name' => "More", 'class' => 'regulartab' ); $bp_tabs[] = array( 'type' => 'regular', 'name' => "Test", 'class' => 'regulartab' ); }
So make sure the names are the actual group names
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.June 11, 2014 at 02:24 #19661nusolutionsParticipantSooo I went and created some additional profile groups each with their own set of questions:
About
Biker Profile
Features
Photos
SeekingSo instead of listing all of these I only want to display one additional tab: My photos. So here’s what I ended up with which works exactly as I want it:
COPY CODE/** * Sweetdate Child Theme Functions * Add extra code or replace existing functions */ //my changes to profile tabs add_action('after_setup_theme','kleo_my_custom_tabs'); function kleo_my_custom_tabs() { global $bp_tabs; $bp_tabs = array(); $bp_tabs['base'] = array( 'type' => 'regular', 'name' => "About", 'group' => 'Base', 'class' => 'regulartab' ); /* rtMedia tab - only if plugin installed */ if (class_exists('RTMedia')) { $bp_tabs['rtmedia'] = array( 'type' => 'rt_media', 'name' => __('My photos', 'kleo_framework'), 'class' => 'mySlider' ); } /* Bp-Album tab - only if plugin installed */ elseif (function_exists('bpa_init')) { $bp_tabs['bp-album'] = array( 'type' => 'bp_album', 'name' => __('My photos', 'kleo_framework'), 'class' => 'mySlider' ); } } ?>
Again, awesome support!
-
AuthorPosts
The topic ‘Adding extra tabs _ stuck (sos)!’ is closed to new replies.