-
Author
-
February 25, 2014 at 02:39 #11407studiblogParticipant
Yes, i know there are 2 other topics with the same questions. I did all changes in the functions.php (child theme) but nothing happen. I have a profile field called “Lifestyle”
I added the code to the END of my functions.php
Thats my whole functions.php, do you see any issue why it does not work?COPY 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( "init", "kleo_blockusers_init" ); function kleo_blockusers_init() { if ( is_admin() AND ! current_user_can( "administrator" ) AND ! ( defined( "DOING_AJAX" ) AND DOING_AJAX ) ) { wp_redirect( home_url() ); exit; } } /* Filter the redirect url for login*/ add_filter("login_redirect","kleo_redirect_to_profile",100,3); function kleo_redirect_to_profile($redirect_to_calculated,$redirect_url_specified,$user){ /*if no redirect was specified,let us think ,user wants to be in wp-dashboard*/ if(!is_super_admin($user->ID)) return bp_core_get_user_domain($user->ID ); else return $redirect_to_calculated; /*if site admin*/ } // Filter wp_nav_menu() to add profile link add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' ); function my_nav_menu_profile_link($menu) { if (!is_user_logged_in()) return $menu; else { $profilelink = '<li><a href="' . bp_loggedin_user_domain( '/' ) . '" rel="nofollow">' . __('Profile') . '</a></li>'; $menu = $menu . $profilelink; return $menu; } } add_action('user_register', 'kleo_pmpro_default_level'); function kleo_pmpro_default_level($user_id) { pmpro_changeMembershipLevel(1,$user_id); } // redirect to registration page instead of membership levels page add_filter('kleo_pmpro_url_redirect', 'my_custom_redirect'); function my_custom_redirect() { if (is_user_logged_in()) { return pmpro_url("levels"); } else { return bp_get_signup_page(); } add_action('after_setup_theme','kleo_my_actions'); function kleo_my_actions() { global $bp_tabs; $bp_tabs['lifestyle'] = array( ‘type’ => ‘regular’, ‘name’ => __(‘Lifestyle’, ‘kleo_framework’), ‘group’ => ‘Lifestyle’, ‘class’ => ‘regulartab’ ); } } ?>
February 27, 2014 at 14:27 #11550AbeKeymasterHi, Make sure you don’t have any spaces and the end in the field name in Users – Profile fields
and you are missing one line in the function. THis is correctCOPY CODE// Add another tab add_action('after_setup_theme','kleo_my_actions'); function kleo_my_actions() { global $bp_tabs; $bp_tabs['lifestyle'] = array( 'type' => 'regular', 'name' => __('Lifestyle', 'kleo_framework'), 'group' => 'Lifestyle', '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.February 27, 2014 at 17:11 #11581studiblogParticipantThanks for your help, but the lifestyle tab does not appear.
There are no spaces in the Field name in User-Profile fields.
The “looking for” tab was shown but i delated this tab a week ago in User-Profile fields, because I don’t need it. I have no idea whats wrong.
Do you want ftp access or backend access?
By the way: I added the folder page-parts to my childtheme. Is there also regulary a functions.php in the page-parts folder? Because there is one in my folder with elements from the “normal” functions.php
I am a bit confused how this could happen.March 1, 2014 at 03:39 #11694AbeKeymasterif you deleted the Looking for Group then there is no way it will appear 🙂
Tabs are in fact Profile Groups
there should be only one functions.php in your sweetdate-child folder and it should be empty or just have custom codes you add(nothing from the parent theme)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.March 1, 2014 at 18:02 #11711studiblogParticipanthmpf… I did not know that I can not change Profile groups. I added a “looking for” group again, but nothing happened. I guess I delated some basic code with delating the “Looking for” group, so can you tell me which file i have to replace to restore the original “Looking for” group. I have backups…
with the functions.php, that was a copy&paste mistake, now I have only one functions.php in my child theme. (the one you can see above)
Thanks a lotMarch 4, 2014 at 22:18 #11896AbeKeymasterYes you can change them but then you need to change which one you want to display as tabs next to profile using the code above. Make sure the new added field has the exact name as in the code
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.March 4, 2014 at 22:18 #11897AbeKeymasterFrom Sweetdate – Buddypress you can do the import again of profile fields
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.March 5, 2014 at 12:21 #11949studiblogParticipantOk thank, I imported the hole folder “bbpress” in sweetdate. This works, now I have the 3 basic profile groups again.
https://www.dropbox.com/s/m4goxxw2vwgkkcd/Bildschirmfoto%202014-03-05%20um%2010.35.44.pngThen I used the code you gave me in #11550, but the Lifestyle Tab does not appear.
The code to change the order of the tabs (I want the About me tab first) in this thread does not work for me too: https://archived.seventhqueen.com/forums/topic/how-to-add-more-tabs-next-to-the-profile-image
I used the code like in #1311.
This is very weird.March 7, 2014 at 23:46 #12282AbeKeymasterPlease make sure you have the child theme active… I really can’t tell what you are doing wrong. It is not that hard to change those codes if you have really basic PHP knowledge
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. -
AuthorPosts
The topic ‘Add Profile tabs’ is closed to new replies.