-
Author
-
August 13, 2013 at 09:10 #1309SQadminKeymaster
SINCE Sweetdate Version 2.8 the profile tabs are handled from WP ADMIN – Sweetdate – BP Profile Tabs.
The codes below can also be used if you want to do it programmatically.See also a more detailed post here:
https://archived.seventhqueen.com/forums/topic/how-to-add-tabs-next-to-profile-image-extendedHi,
This explains how to add/modify profile tabs starting from theme version 1.5.
By default we have added 3 tabs: Looking for, About me, My photos(gets photos form rtMedia or Bp-Album)
This tabs are configured from an array that can be modified by you in sweetdate-child/functions.phpLet’s add another tab with another profile group named “Social” and modify the name of rtMedia “My photos” tab in “My work”
You should end up having something like this in your sweetdate-child/functions.php:COPY CODE//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['looking-for'] = array( 'type' => 'cite', 'name' => __('Looking for', 'kleo_framework'), 'group' => 'Looking 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' ); }
NEW PAGE TAB. Use it like this below code. “Reasons to join” is the page name
COPY CODEadd_action('after_setup_theme','kleo_my_page_tab'); function kleo_my_page_tab() { global $bp_tabs; $bp_tabs[] = array( 'type' => 'page', 'name' => 'Reasons to join', 'class' => 'pagetab' ); }
NOTE:
For this to work you should have the child theme activatedAugust 13, 2013 at 09:20 #1311SQadminKeymasterTo change the order of the tabs we can remove the default added tabs by reinitializing the array with $bt_tabs = array(); and the adding our own tabs:
COPY CODEadd_action('after_setup_theme','kleo_my_actions'); function kleo_my_actions() { global $bp_tabs; $bp_tabs = array(); $bp_tabs['base'] = array( 'type' => 'regular', 'name' => apply_filters('kleo_extra_tab2',__('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 photos', 'kleo_framework'), 'class' => 'mySlider' ); } /* Bp-Album tab - only if plugin installed */ elseif (function_exists('bpa_init') AND sq_option('bp_album', 1) == 1) { $bp_tabs['bp-album'] = array( 'type' => 'bp_album', 'name' => __('My photos', 'kleo_framework'), 'class' => 'mySlider' ); } $bp_tabs['looking-for'] = array( 'type' => 'cite', 'name' => apply_filters('kleo_extra_tab1', __('Looking for', 'kleo_framework')), 'group' => apply_filters('kleo_extra_tab1', 'Looking for'), 'class' => 'citetab' ); }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAugust 13, 2013 at 15:38 #1319inboxiParticipantthis is not working for me and does not change anything. advise?
i deleted all the tabs except for base and created two new tabs, “More” and “Test”. This is how my sweetdate-child/functions.php code looks:
<?php
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’
);}
?>
August 13, 2013 at 15:46 #1321SQadminKeymasterYou need to have the sweetdate-child theme activated. Also the user you are viewing needs to have some fields from the profile groups completed.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAugust 13, 2013 at 17:58 #1334inboxiParticipant– Also the user you are viewing needs to have some fields from the profile groups completed.
yes, i forgot about that.worked perfect. thanks again!
August 15, 2013 at 01:42 #1406GapronParticipantHello,
The child theme, caused a server error when I want to activate it.
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
And I can still find a way to change the tab Id from My photos to My Work.
Any suggestions here?
Thanks,
JeremieAugust 15, 2013 at 01:43 #1407GapronParticipantThere is no way to use two themes as active at the same time.
August 15, 2013 at 09:53 #1410kellylouise007ParticipantSorry, I don’t understand whats going on.
My tabs have disappeared entirely.
I’ve copied the code and added it to the child theme – But nothing.Help much appreciated.
ThanksAugust 15, 2013 at 10:13 #1412SQadminKeymasterHi,
You need to have the child theme activated. Not two themes active.
I have posted for you the code above to rename the tab but I’ll copy/paste it again:COPY CODE<?php add_action('after_setup_theme','kleo_my_actions'); function kleo_my_actions() { global $bp_tabs; $bp_tabs['rtmedia'] = array( 'type' => 'rt_media', 'name' => __('My work', 'kleo_framework'), 'class' => 'mySlider' ); $bp_tabs['social'] = array( 'type' => 'regular', 'name' => __('Social', 'kleo_framework'), 'class' => 'regulartab' ); } ?>
Delete whatever you have in sweetdate-child/functions.php and add the above code. You can then add the login redirect code
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAugust 15, 2013 at 10:14 #1413SQadminKeymasterHi,
Give us an email at themesupport@seventhqueen.com with temporary access to FTP to see what’s going onHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAugust 15, 2013 at 10:44 #1415SQadminKeymasterHi, It is fine now. You have renamed you “Base” group to “About” so you had to change the code to show that specific tab. I added the code in sweetdate-child at the bottom of the file.
Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAugust 15, 2013 at 10:46 #1417GapronParticipantHello, Nothing change on mine here.
The My Photos remain my photos, and no other tabs added.
August 15, 2013 at 10:49 #1418SQadminKeymasterHi,
You need to activate the sweetdate-child. Is it active? If you can’t figure it out email us acces to website and ftp: themesupport@seventhqueen.comHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAugust 15, 2013 at 10:55 #1420GapronParticipantYes the Child Theme is active. And I’ve just sent you an email with my FTP details.
Thanks,
JeremieMarch 6, 2014 at 01:38 #12038AbeKeymastercustom code for telui:
//custom code for telui add_action('after_setup_theme','kleo_my_custom_tabs'); function kleo_my_custom_tabs() { global $bp_tabs; $bp_tabs['base'] = array( 'type' => 'regular', 'name' => __('About me', 'kleo_framework'), 'group' => 'Base', 'class' => 'regulartab' ); $bp_tabs[] = array( 'type' => 'regular', 'name' => __('Myself Summary', 'kleo_framework'), 'class' => 'regulartab' ); $bp_tabs[] = array( 'type' => 'regular', 'name' => __('My existing Language Level', 'kleo_framework'), 'class' => 'regulartab' ); return $bp_tabs; }
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.May 19, 2016 at 03:22 #122343ChillibabeParticipant‘Hi Abe! Kindly help me with my tabs as well. I enabled the profile tabs but they do not show up on the website except for the default one, About Me. I tried to refresh the page severally with no success. I can’t seem to figure it all out. Thank you. I am also going to email you with my website access just now. Thank you.
May 20, 2016 at 13:33 #122526AbeKeymasterHi there, see the setting in Theme options:
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.Attachments:
You must be logged in to view attached files. -
AuthorPosts
You must be logged in to reply to this topic.