Problems with redirecting a BuddyPress custom subnav item [closed]

You can force the link. Try: bp_core_new_subnav_item( array( ‘name’ => ‘Create Virtual Village’, ‘slug’ => ‘create’, ‘parent_url’ => ‘groups’, ‘parent_slug’ => ‘groups’, ‘screen_function’ => ‘false’, ‘position’ => 50, ‘link’ => get_option(‘siteurl’) . ‘/groups/create/step/group-details/’ ) );

How to get all users that uploaded avatars or have gravatars? [closed]

This function bp_get_user_has_avatar() calls bp_core_fetch_avatar with this argument ‘no_grav’ => true so you could write your own function to see if a user is not using the default avatar: function lurie_avatar_check( $user_id ) { $retval = false; if ( bp_core_fetch_avatar( array( ‘item_id’ => $user_id, ‘no_grav’ => false, ‘html’ => false ) ) != bp_core_avatar_default( ‘local’ … Read more

Change xprofile visibility options in Buddypress [closed]

There’s a filter for that: bp_xprofile_get_visibility_levels. It is used to filter an array of visibility levels, which is initialized like so: $this->visibility_levels = array( ‘public’ => array( ‘id’ => ‘public’, ‘label’ => _x( ‘Everyone’, ‘Visibility level setting’, ‘buddypress’ ) ), ‘adminsonly’ => array( ‘id’ => ‘adminsonly’, ‘label’ => _x( ‘Only Me’, ‘Visibility level setting’, ‘buddypress’ … Read more

Buddypress Welcome Email [closed]

For the activation email, you can use the filter hook in buddypress\bp-members\bp-members-functions.php $message = apply_filters( ‘bp_core_signup_send_validation_email_message’, $message, $user_id, $activate_url ); For example, try this in your theme/functions.php function gavin_welcome_message( $message, $user_id, $activate_url ) { $message=”Gavin says something here… ” . $message; return $message; } add_filter(‘bp_core_signup_send_validation_email_message’, ‘gavin_welcome_message’, 15, 3);

Fill the content of newly added Profile Tab (BuddyPress)

Please check the code below. I guess you are facing 404 because it’s not getting the slug & the url properly. add_action( ‘bp_setup_nav’, ‘mb_bp_profile_menu_posts’ ); function mb_bp_profile_menu_posts() { global $bp; bp_core_new_nav_item( array( ‘name’ => ‘My Posts’, ‘slug’ => ‘myposts’, ‘position’ => 11, ‘default_subnav_slug’ => ‘published’, ‘screen_function’ => ‘mb_author_posts’, ‘parent_url’ => bp_displayed_user_domain() . ‘/myposts/’, ‘parent_slug’ => … Read more

How to add an error or notification to an activity?

With enough digging I figured it out. First off you must save your error message to as activity meta data like so: public function send_team_notification($activity) { $message = $this->send_custom_notification($activity->content); if(is_wp_error($message)){ bp_activity_update_meta( $activity->id, ‘custom_error’, $message ); } } This will appear in the database under the wp_bp_activity_meta table like so: From there you can either manually … Read more

conditional activity page for buddypress [closed]

It sounds like you are using a bp_has_members loop on some page. I don’t think you can change a define while in a loop. In that loop, do you have this code? <a href=”https://wordpress.stackexchange.com/questions/226262/<?php bp_member_permalink(); ?>”><?php bp_member_avatar(); ?></a> And / Or: <a href=”https://wordpress.stackexchange.com/questions/226262/<?php bp_member_permalink(); ?>”><?php bp_member_name(); ?></a> Then you could do something like this: <?php … Read more

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