Template tags for Buddypress
I think you probably want to use bp_core_get_user_domain(); I think bp_core_get_userurl() was taken out after the first release of BuddyPress.
I think you probably want to use bp_core_get_user_domain(); I think bp_core_get_userurl() was taken out after the first release of BuddyPress.
I don’t think there is one. The only difference with BuddyPress on multsite verses single is.. .the users get blogs. As for the buddypress theme itself. The bp template pack shows exactly what template files are used as extra. They are all labeled according to their use.
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
<?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 } } } ?>
I figured out a way to go about adding the image type field without editing core BuddyPress files. The solution involves adding code to the theme’s functions.php that intercepts the plugin’s loading, display and saving. It also updates the WordPress upload location in order to direct the profile images to a subdirectory of the the … Read more
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
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
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
Reading the code I would try something like this: add_filter( ‘bp_core_signup_send_validation_email_to’, ‘wpse_60858_catch_user_signup_mail’ ); function wpse_60858_catch_user_signup_mail() { // make sure to use a valid email. test it with different addresses return get_site_option( ‘admin_email’, ‘[email protected]’ ); } This changes the $to part only.
There are two ways to do that: From the plugin settings page On the “Loggedin Links” option, the second anchor tag is pointing to WordPress profile by default: ‘<a href=”http://yoursite.com/wp-admin/profile.php”>Profile</a>’. You have to update this to point to Buddypress profile page, to do so, you need to know what is the members domain that Buddypress … Read more