BuddyPress – How to add logout in nav menu

Google is your friend. Here is a snippit I found I didn’t test it but seems logical. // functions.php function add_login_logout_link($items, $args) { if(is_user_logged_in()) { $newitems=”<li><a title=”Logout” href=””. wp_logout_url(‘index.php’) .'”>Logout</a></li>’; $newitems .= $items; } else { $newitems=”<li><a title=”Login” href=””. wp_login_url(‘index.php’) .'”>Login</a></li>’; $newitems .= $items; } return $newitems; } add_filter(‘wp_nav_menu_items’, ‘add_login_logout_link’, 10, 2); Source

Exclude User from Activity Stream in BuddyPress?

<?php add_action(“plugins_loaded”,”bpdev_init_sm_mode”); function bpdev_init_sm_mode(){ global $current_user; if(is_user_logged_in()) { get_currentuserinfo(); if(“someusername” == $current_user->user_login) { remove_action(“wp_head”,”bp_core_record_activity”);//id SM is on, remove the record activity hook } } } ?>

How to get larger version of author avatar

I found the function that makes up bp_post_author_avatar() and then changed the type to full. Place this funtion in functions.php and use the new function to call the post author avatar in the template. function fod_post_author_avatar() { global $post; if ( function_exists(‘bp_core_fetch_avatar’) ) { echo apply_filters( ‘bp_post_author_avatar’, bp_core_fetch_avatar( array( ‘item_id’ => $post->post_author, ‘type’ => ‘full’ … Read more

I’m trying to Add a new Buddypress menu tab and it is not showing up [closed]

Make sure that you only attempt to set up the items after BP has set up its core navigation. You can ensure this by hooking to bp_setup_nav with a priority higher than 10. Thus: function bbg_setup_nav() { bp_core_new_subnav_item( array( ‘name’ => ‘Document List’, ‘slug’ => ‘group-document-list’, ‘parent_url’ => $bp->loggedin_user->domain . $bp->groups->slug . “https://wordpress.stackexchange.com/”, ‘parent_slug’ => … Read more

How to Change BuddyPress Mystery Man Graphic without Overwriting Core Image File [closed]

I’ve used this code on my own BuddyPress site. Works like a charm! // Use a better image than default mystery man function bp_custom_set_avatar_constants() { define( ‘BP_AVATAR_DEFAULT’, get_stylesheet_directory_uri() . ‘/images/mystery-man.jpg’ ); define( ‘BP_AVATAR_DEFAULT_THUMB’, get_stylesheet_directory_uri() . ‘/images/mystery-man-50.jpg’ ); } add_action( ‘bp_init’, ‘bp_custom_set_avatar_constants’, 2 ); Add this to your bp-custom.php file, or, if you’re developing a theme, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)