Search Results for 'bp_get_displayed_user_nav'
-
AuthorSearch Results
-
September 19, 2012 at 11:49 pm #142122r-a-yKeymaster
You’ll want to take a look at the bp_get_displayed_user_nav() function.
There’s a filter there that applies to each menu item, which you can hook into and override.
July 25, 2012 at 10:42 am #137950Tammie ListerModeratorOk, this forum post goes into adding and removing here https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-remove-and-add-items-in-bp_get_displayed_user_nav/
November 3, 2011 at 1:29 pm #123676leethompsonMemberThis is a great post but what about moving sub links to a new parent item, this kinda works but if I remove the parent item the function stops. in my themes functions.php
`function remove_blogs_nav() {
bp_core_remove_nav_item( ‘privacy’ );
bp_core_remove_nav_item( ‘settings’ );
bp_core_remove_nav_item( ‘invite-anyone’ );
}
add_action( ‘bp_setup_nav’, ‘remove_blogs_nav’, 15 );function bp_add_create_group_subnav() {
global $bp;
$groups_link = ‘/groups-2/’;
$settings_link = $bp->loggedin_user->domain ;/* Add the subnav items to the groups nav item */
if (function_exists(‘bp_core_new_subnav_item’)) {
bp_core_new_subnav_item( array(
‘name’ => __( ‘Create Clan’, ‘buddypress’ ),
‘slug’ => ‘create’,
‘parent_url’ => $groups_link,
‘parent_slug’ => $bp->groups->slug,
‘screen_function’ => ‘groups_screen_group_home’,
‘position’ => 40,
‘item_css_id’ => ‘home’ ) );bp_core_new_subnav_item( array(
‘name’ => __( ‘Settings’, ‘buddypress’ ),
‘slug’ => ‘settings’,
‘parent_url’ => $settings_link,
‘parent_slug’ => $bp->profile->slug,
‘screen_function’ => ‘profile-settings’,
‘position’ => 30,
‘item_css_id’ => ‘profile-settings’ ) );bp_core_new_subnav_item( array(
‘name’ => __( ‘Privacy’, ‘buddypress’ ),
‘slug’ => ‘privacy’,
‘parent_url’ => $settings_link,
‘parent_slug’ => $bp->profile->slug,
‘screen_function’ => ‘profile-privacy’,
‘position’ => 30,
‘item_css_id’ => ‘profile-privacy’ ) );}
}
add_action(‘bp_setup_nav’, ‘bp_add_create_group_subnav’);
`
If I comment out :
`// bp_core_remove_nav_item( ‘privacy’ );
// bp_core_remove_nav_item( ‘settings’ );`The sub links are in the Profile item, and functional, but still link to each original man item.
thanks Boone you are a lot of help
September 27, 2011 at 6:39 pm #121288r-a-yKeymasterYou’d need to get rid of `bp_get_displayed_user_nav()` and `bp_get_options_nav()` from your BP templates specifically in the /members/single/ folder of your theme.
September 21, 2011 at 11:51 am #120403In reply to: [Resolved] Customizing bp_get_displayed_user_nav()
exceilMemberp.s im quite noob in programming
September 21, 2011 at 11:50 am #120402In reply to: [Resolved] Customizing bp_get_displayed_user_nav()
exceilMemberHi !
I want to do the same thing what you defunctlif but i have a problem. I created bp-custom.php file with your settings and put it in buddypress main directory and it doesn’t work should i put it somewhere else?May 28, 2011 at 1:00 am #113229AlexKalopsiaMemberSorry, looks like I made triple thread -.-
April 11, 2011 at 5:51 pm #110035April 10, 2011 at 9:44 pm #109947r-a-yKeymaster@nahummadrid – This is a known bug. Using bp_core_remove_nav_item() will remove access to those pages as well. Right now, I’d suggest hiding the nav item via CSS or by hacking the $bp global to remove the item.
April 10, 2011 at 11:43 am #109906NahumParticipant`function boone_remove_groups_nav() {
bp_core_remove_nav_item( ‘groups’ );
}
add_action( ‘bp_setup_nav’, ‘boone_remove_groups_nav’, 15 );
`
When I put in functions it doesn’t work at all. The only way i get this to work is putting it in the BP-Custom but then it cuts off all access to groups and forum subpages….can’t figure whyMarch 11, 2011 at 4:09 pm #107545In reply to: Customizing profile page navigation strip
nigelandersonMemberI’ve made some headway but still need help if anyone is able…
I’ve been editing the CSS of my child theme to simply set the display property of the items I want to omit (eg ‘blogs’) to ‘none’ so that they do not show up.
I have also used this to add the logged-in-user-specific links I want to my navigation bar:
<li><a href="#"></a> <ul> </ul> </li>
which now displays. I don’t have fine control over it, eg changing the text or altering the order, though I can live with that. But, my CSS trick of locating the element’s id and setting its display property to none doesn’t work in my drop-down menu.
It seems as if I need to actually have bp_get_displayed_user_nav() return a different list than it does by default.
Any ideas?
Thanks!
March 11, 2011 at 11:08 am #107526In reply to: Customizing profile page navigation strip
nigelandersonMemberPartly answering my own question, from the default buddypress theme I’ve found that the navigation strip is generated by this bit of code:
<div class="item-list-tabs no-ajax" id="object-nav"> <ul> </ul> </div>
Could someone explain a little about how this works? I’ve located bp_get_displayed_user_nav() in the bp-core-templatetags file. I’m not sure about the next line.
Thanks!
March 8, 2011 at 10:14 pm #107237IntownWebProsMemberI tried the solution posted here https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-remove-and-add-items-in-bp_get_displayed_user_nav#post-71009 and it is not working for me. Is it possible that the code changed with the recent update (I think it was 1.2.?
I could really use some help here.
Thanks in advance.
March 5, 2011 at 2:34 am #106865imjscnParticipantLast year Boone’s code worked (I used it in bp-custom.php), now, after several BP upgrades, it generate error message.
Currently, I get erro of “in ……/plugins/invite-anyone/by-email/by-email.php on line 390”February 14, 2011 at 11:51 pm #105425In reply to: Hide Notification Settings
pcwriterParticipantTo remove the notifications subnav item, add the following snippet to your functions.php file:
`function remove_notifications_subnav(){
global $bp;
if ( $bp->current_component == $bp->settings->slug ) {
bp_core_remove_subnav_item($bp->settings->slug, ‘notifications’);
}
}
add_action( ‘wp’, ‘remove_notifications_subnav’, 2 );`This is a simple function taken from this post by @mariochampion
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-remove-and-add-items-in-bp_get_displayed_user_nav/?topic_page=2&num=15#post-71265Hope this helps!
February 9, 2011 at 7:03 pm #105033In reply to: Where are the functions
modemlooperModeratorhas_members()
next_member()
rewind_members()
members()
the_member()
bp_rewind_members()
bp_has_members( $args = ” )
‘type’ => $type,
‘page’ => $page,
‘per_page’ => 20,
‘max’ => false,
‘include’ => false, // Pass a user_id or comma separated list of user_ids to only show these users
‘user_id’ => $user_id, // Pass a user_id to only show friends of this user
‘search_terms’ => $search_terms, // Pass search_terms to filter users by their profile data
‘populate_extras’ => true // Fetch usermeta? Friend count, last active etc.bp_the_member()
bp_members()
//Misc
bp_members_pagination_count()
bp_members_pagination_links()
bp_member_user_id()
bp_get_member_user_id()
bp_member_user_nicename()
bp_get_member_user_nicename()
bp_member_user_login()
bp_get_member_user_login()
bp_member_user_email()
bp_get_member_user_email()
bp_member_is_loggedin_user()
bp_member_avatar( $args = ” )
bp_get_member_avatar( $args = ” )
‘type’ => ‘thumb’,
‘width’ => false,
‘height’ => false,
‘class’ => ‘avatar’,
‘id’ => false,
‘alt’ => __( ‘Member avatar’, ‘buddypress’ )bp_member_permalink()
bp_member_link()
bp_get_member_link()
bp_member_name()
bp_get_member_name()
bp_member_last_active()
bp_get_member_last_active()
bp_member_latest_update( $args = ” )
bp_get_member_latest_update( $args = ” ) {
‘length’ => 15bp_member_profile_data( $args = ” )
‘field’ => false, // Field name
bp_member_registered()
bp_get_member_registered()
bp_member_add_friend_button()
bp_add_friend_button( $members_template->member->id, $friend_status )
bp_member_total_friend_count()
bp_get_member_total_friend_count()
bp_member_random_profile_data()
bp_member_hidden_fields()
bp_directory_members_search_form()
bp_total_site_member_count()
bp_get_total_site_member_count()
//Check bp-core-templatetags.php for comments about nav tags
bp_get_loggedin_user_nav()
bp_get_displayed_user_nav()
bp_get_options_nav()
bp_get_options_title()
//Avatar Tags
bp_has_options_avatar()
bp_get_options_avatar()
bp_comment_author_avatar()
bp_post_author_avatar()
bp_loggedin_user_avatar( $args = ” )
bp_get_loggedin_user_avatar( $args = ” ) {
‘type’=> ‘thumb’,
‘width’=> false,
‘height’=> false,
‘html’=> truebp_displayed_user_avatar( $args = ” )
bp_get_displayed_user_avatar( $args = ” )
‘type’=> ‘thumb’,
‘width’=> false,
‘height’=> false,
‘html’=> truebp_avatar_admin_step()
bp_get_avatar_admin_step()
bp_avatar_to_crop()
bp_get_avatar_to_crop()
bp_avatar_to_crop_src()
bp_get_avatar_to_crop_src()
bp_avatar_cropper()
//Other
bp_site_name()
bp_core_get_wp_profile()
bp_get_profile_header()
bp_exists( $component_name )
bp_format_time( $time, $just_date = false )
bp_word_or_name( $youtext, $nametext, $capitalize = true, $echo = true )
bp_your_or_their( $capitalize = true, $echo = true )
bp_get_plugin_sidebar()
bp_page_title()
bp_get_page_title()
bp_styles()
bp_has_custom_signup_page()
bp_signup_page()
bp_get_signup_page()
bp_has_custom_activation_page()
bp_activation_page()
bp_get_activation_page()
bp_search_form_enabled()
bp_search_form_action()
bp_search_form_type_select()
bp_search_form()
bp_log_out_link()
bp_custom_profile_boxes()
bp_custom_profile_sidebar_boxes()
bp_create_excerpt( $text, $excerpt_length = 55, $filter_shortcodes = true )
bp_is_serialized( $data )
bp_total_member_count()
bp_get_total_member_count()
bp_signup_username_value()
bp_get_signup_username_value()
bp_signup_email_value()
bp_get_signup_email_value()
bp_signup_with_blog_value()
bp_get_signup_with_blog_value()
bp_signup_blog_url_value()
bp_get_signup_blog_url_value()
bp_signup_blog_title_value()
bp_get_signup_blog_title_value()
bp_signup_blog_privacy_value()
bp_get_signup_blog_privacy_value()
bp_signup_avatar_dir_value()
bp_get_signup_avatar_dir_value()
bp_current_signup_step()
bp_get_current_signup_step()
bp_signup_avatar( $args = ” )
bp_get_signup_avatar( $args = ” ) {
‘size’ => BP_AVATAR_FULL_WIDTH,
‘class’ => ‘avatar’,
‘alt’ => __( ‘Your Avatar’, ‘buddypress’ )
bp_signup_allowed()
bp_get_signup_allowed()
bp_blog_signup_allowed()
bp_get_blog_signup_allowed()
bp_account_was_activated()
bp_registration_needs_activation()
bp_mentioned_user_display_name( $user_id_or_username )
bp_get_mentioned_user_display_name( $user_id_or_username )
bp_get_option( $option_name )
bp_ajax_querystring( $object = false )
bp_last_activity( $user_id = false, $echo = true )
bp_user_has_access()
bp_user_firstname()
bp_get_user_firstname()
bp_loggedin_user_link()
bp_get_loggedin_user_link()
bp_loggedinuser_link()
bp_displayed_user_link()
bp_get_displayed_user_link()
bp_user_link()
bp_displayed_user_id()
bp_current_user_id()
bp_loggedin_user_id()
bp_displayed_user_domain()
bp_loggedin_user_domain()
bp_displayed_user_fullname()
bp_get_displayed_user_fullname()
bp_user_fullname() { echo bp_get_displayed_user_fullname()
bp_loggedin_user_fullname()
bp_get_loggedin_user_fullname()
bp_displayed_user_username()
bp_get_displayed_user_username()
bp_loggedin_user_username()
bp_get_loggedin_user_username()
bp_current_component()
bp_current_action()
bp_current_item()
bp_action_variables()
bp_root_domain()
bp_get_root_domain()
//Conditionals
bp_is_blog_page()
bp_is_my_profile()
bp_is_home()
bp_is_front_page()
bp_is_activity_front_page()
bp_is_directory()
bp_is_page($page)
bp_is_active( $component )
bp_is_profile_component()
bp_is_activity_component()
bp_is_blogs_component()
bp_is_messages_component()
bp_is_friends_component()
bp_is_groups_component()
bp_is_settings_component()
bp_is_member()
bp_is_user_activity()
bp_is_user_friends_activity()
bp_is_activity_permalink()
bp_is_user_profile()
bp_is_profile_edit()
bp_is_change_avatar()
bp_is_user_groups()
bp_is_group()
bp_is_group_home()
bp_is_group_create()
bp_is_group_admin_page()
bp_is_group_forum()
bp_is_group_activity()
bp_is_group_forum_topic()
bp_is_group_forum_topic_edit()
bp_is_group_members()
bp_is_group_invites()
bp_is_group_membership_request()
bp_is_group_leave()
bp_is_group_single()
bp_is_user_blogs()
bp_is_user_recent_posts()
bp_is_user_recent_commments()
bp_is_create_blog()
bp_is_user_friends()
bp_is_friend_requests()
bp_is_user_messages()
bp_is_messages_inbox()
bp_is_messages_sentbox()
bp_is_notices()
bp_is_messages_compose_screen()
bp_is_single_item()
bp_is_activation_page()
bp_is_register_page()
bp_the_body_class()
bp_get_the_body_class( $wp_classes, $custom_classes = false )November 16, 2010 at 1:53 pm #98397Justin FrydmanParticipantHey guys,
Regarding @nuprn1 post, bp_get_displayed_user_nav() is not displaying any tabs on this custom page.
Any ideas?
November 3, 2010 at 9:42 am #97326Roger CoathupParticipant@boonebgorges – given the bug fix / re-engineering is scheduled for 1.3, I’m guessing the best short term workaround is to hard code our own bespoke user nav
October 2, 2010 at 10:10 pm #94072Paul Wong-GibbsKeymasterIt is a bug, we have a ticket: https://trac.buddypress.org/ticket/2644
October 2, 2010 at 8:11 pm #94059PatrikParticipant@youngmicroserf I’m having the same issue with the example that @mariochampion provided.
mariochampion or anyone else who knows; it would be very helpfull if you could tell what to change. I assume it’s the xprofile.php file we should copy and edit since I can’t find a file named xprofile-setting.php.
September 25, 2010 at 10:23 am #93364sebastianParticipantI have found a solution.
This did what I wanted:
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-remove-and-add-items-in-bp_get_displayed_user_nav#post-71009all I had to add was:
if (! is_user_logged_in)Thanks!
September 21, 2010 at 5:09 pm #93042youngmicroserfParticipantI’m bumping this because the @-mention above didn’t work, apparently.
for some reason, your suggested solution doesn’t work. I suppose it has to do with the hook, but using bp_core_remove_nav_item(‘groups’) doesn’t work at ‘bp_setup_nav’, while it does work at the point @mariochampion suggested.
Here’s a problem, though, in my installation, when I remove the nav link, I am no longer able to access group pages. I can access the group directory and groups will be displayed there, but clicking on a group will take me to the front page. Is this a bug? It seems like it, since the function is supposed to only remove the navigation item, not access to the feature, am I right? Or am I not getting something? Is there a better way to remove the navigation item?
September 21, 2010 at 6:05 am #92986youngmicroserfParticipantHmm. Is this the intended effect? I removed the “groups” element from the navigation bar on the profile using the bp_core_remove_nav_item-function, but after doing that I was no longer able to access any group and after directly entering the group’s URL I will be redirected to the homepage. Is there any way to remove items from the *navigation* but keep them available for direct access? Bizarrely, I am able to display the groups directory page when the bp_core_remove_nav_item(‘groups’)-function is active, but not individual group homepages. Clicking on a group name will take me to the homepage.
Are there other options for menu item removal?
Thanks!
September 21, 2010 at 5:44 am #92984youngmicroserfParticipant@Boone Gorges,
using bp_core_remove_nav_item( ‘blogs’ ) at bp_setup_nav didn’t work for me. But putting it in mariochampions function right after “global $bp” did – any idea why?
sorry, but I’m new to BP, and I can’t find the xprofile-settings.php you’re referring to above – could you give me a hand? Could you also indicate where you changed the slugs in the copied file?
Thanks!
September 20, 2010 at 6:54 am #92908In reply to: Subpage for a users profile
-
AuthorSearch Results