Show buddypress notification in the frontend [closed]

Put the following code in your functions.php. If you want a demo i can show you. // my custom notification menu www.cityflavourmagazine.com function my_bp_adminbar_notifications_menu() { global $bp; if ( !is_user_logged_in() ) return false; echo ‘<li id=”top-notification”>’; _e( ‘Alerts’, ‘buddypress’ ); if ( $notifications = bp_core_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?> <span><?php echo count( $notifications ) … Read more

How to Create a Custom WordPress Navigation Menu with the Code?

Well first of all you can use the menu feature in the newer WordPress. First you want to activate the fact that you want to use this feature via your functions.php file. // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( ‘primary’ => __( ‘Primary Navigation’, ‘your_theme_name’ ), ‘secondary’ => __(‘Secondary Navigation’, ‘your_theme_name’) ) … Read more

How to ensure buddypress custome profile field is unique

You should be able to enforce uniqueness with a filter something like this (untested…consider this pseudocode, just the basic idea): add_filter( ‘bp_xprofile_field_type_is_valid’, function( $validated, $values, $field ) { global $bp, $wpdb; // you’ll need to constrain this to your particular field type if ( $field->id === $your_field_id ) { $results = $wpdb->get_results( $wpdb->prepare( sprintf( “SELECT … Read more

Login redirect to certain bp profile page

this one works better imho, not my code btw 🙂 put it in /plugins/bp-custom.php //=Redirect to User’s Profile Page after Login function rt_login_redirect($redirect_to, $set_for, $user){ $redirect_to = bp_core_get_user_domain($user->id); return $redirect_to; } add_filter(‘login_redirect’, ‘rt_login_redirect’, 20, 3);

BuddyPress on Multisite [closed]

John James Jacoby, Lead developer of BuddyPress said this. BuddyPress sits on top of an entire WordPress installation, regardless of configuration. That means on single-site, multi-site, or multi-network installations, BuddyPress only has 1 set of data tables. As a result, you only have 1 set of Groups, Activity, Private Messages, Profiles, and Friends, even if … Read more

Change management solution for BP-based site?

There is no settled solution for change management in a WordPress environment. I recently wrote about one approach, that might be helpful. @scribu then brought our attention to this new ‘Ramp’ offering for content staging. which might be of interest, depending on your use case. @MikeSchinkel has his own potential solution which doesn’t attempt to … Read more

Delete all user attachments

As media uploads are simly files with no related data stored, you can’t do that unless you extend the user data and save the file names, etc. as user meta data. Simple answer: No, it doesn’t work.

BP Multi Network & Members Directory [closed]

You can filter the members loop in BuddyPress by meta values for the members. So you would need to change the loop in the template file members/members-loop.php to be: <?php // Getting current blog_id global $wpdb, $current_blog; $id = $current_blog->blog_id; // Setting variable for current blog_prefix $blog_prefix = $wpdb->get_blog_prefix( $id ); // Start the BuddyPress … Read more

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