Buddypress Redirection on Users with Subscriber Role

If a subscriber on your BuddyPress site doesn’t have access to a specific page, it’s likely due to membership level restrictions set up on the page, meaning only users with a specific subscription plan (like a “premium” or “pro” level) can access it; you might need to check your BuddyPress settings to adjust access based … Read more

This plugin helps create custom buddypress group tabs but it is producing a 404 error, how can it be edited, is it the screen_function?The code is i

you can use the code below, I edited it to work <?php /* Plugin Name: Custom BuddyPress Group Tabs Description: Adds custom tabs to BuddyPress groups Version: 1.0 Author: Bing */ // create the custom database table upon plugin activation function asdf_group_tabs_install() { global $wpdb; $table_name = $wpdb->prefix . ‘custom_group_tabs’; $charset_collate = $wpdb->get_charset_collate(); $sql = … Read more

Remove “Forum” from BuddyPress group creation step

Could you please try to use the given code which we need to add functions.php file of theme. Use Case : This is to remove the Forum step from the group creation process. add_filter(‘groups_create_group_steps’, function( $steps ) { unset( $steps[‘forum’] ); return $steps; }); Use Case : This is to redirect any attempts to access … Read more

Randomly display activity posts on home page with buddypress

And why not using simple wordpress code, changing args ? $args = array( ‘post_type’ => ‘post’, ‘orderby’ => ‘rand’, ‘posts_per_page’ => ‘1’, ); $my_query = new WP_Query( $args ); if ( $my_query->have_posts() ) { while ( $my_query->have_posts() ) { $my_query->the_post(); /* do your post output here */ } // end while } // end if

BuddyPress Edit activity function good practice

Looking at https://buddypress.trac.wordpress.org/browser/trunk/src/bp-activity/bp-activity-functions.php there’s several functions: Activity Meta I found bp_activity_add_meta, bp_activity_delete_meta and bp_activity_update_meta in that file, e.g. bp_activity_update_meta: // Update activity meta counts. if ( bp_activity_update_meta( $activity_id, ‘favorite_count’, $fav_count ) ) { Activities It looks like these can be updated the same way wp_insert_post can be used to update a post, by calling bp_activity_add … Read more

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