Replies
- Brajesh Singh on November 14, 2017 at 12:58 am in reply to: Adding a Cover image to subsite in a Multisite #11680
Hi Jay,
Thank you for posting.I don’t see any plugin available at the moment that allows it. It is doable but will most probably need custom coding.
Regards
Brajesh - Brajesh Singh on November 13, 2017 at 6:47 pm in reply to: [Resolved] BuddyPress Multi Network Not Showing users on Member Page #11678
Hi Laurent,
I have tested the plugin on WordPress 4.8.3 and BuddyPress 2.9.2 over the weekend. It works. I have updated the installation instruction.Please check it here
https://buddydev.com/plugins/buddypress-multi-network/
Does following the installation works for you(Please make sure to clear any/all caches)
1. Main site will have all the users shown up as members when the login to the main site.
2. On a sub site, a user will appear as member if they register on the sub site or you add them manually from the admin to that sub site or you use a plugin like Join Blog Widget to allow users to join more than 1 blog.
https://buddydev.com/plugins/join-blog-widget/Hope that helps.
Regards
Brajesh - Brajesh Singh on November 11, 2017 at 3:59 pm in reply to: [Resolved] Buddypress Profile order Tab #11673
You are welcome.
There is no need for closing tag?>In fact, It is better to avoid it.
Marking it as resolved.
Hi Carlton,
Are you using the Maximus page builder? If yes, you can load the layout/demo content from pages->Add New and on the new page load from library->Modern Community.
Then you can set this page as home page.
Also, please do this for customizing single page
https://buddydev.com/docs/guides/community-builder/getting-started/customizing-singular-wordpress-site-page-community-builder/Please do note that we are about to release Community Builder 2.0 next week and breaking away from the Maximus Page builder/1.0 look and feel.
So, if you are building a new site which can wait for a week, I will suggest to wait before getting locked in with Maximus.
Thank you
BrajeshHi Leslie,
Yes, it is possible to do so.Do you want to show content on profile or just have a link and link to some content at other place. The second case is very easy.
For the first case, you will need to write code to create BuddyPress Components. It is not difficult but a bit more involved than the normal cases.
Hope that helps.
Regards
Brajesh- Brajesh Singh on November 11, 2017 at 3:06 pm in reply to: [Resolved] Member Types Pro – Emergency #11669
Continuing the discussion on email and will update it accordingly.
- Brajesh Singh on November 11, 2017 at 3:04 pm in reply to: [Resolved] Buddypress Profile order Tab #11668
Hi Tiziano,
you have the<?phptag missing in the bp-custom.php
It should be the first thing.
- Brajesh Singh on November 11, 2017 at 3:04 am in reply to: [Resolved] Member type to restrict and grant access to groups #11664
Hi Tom,
Yes, you can. bp_template_redirect is hooked to WordPress template_redirect action, so it will work from the child theme’s functions.php too.Regards
Brajesh - Brajesh Singh on November 11, 2017 at 2:54 am in reply to: [Resolved] Member type to restrict and grant access to groups #11662
Hi Tom,
You may put thhis code in your bp-custom.php/** * Restrict user from accesisng groups of which he/she is not a member and it's not allowed as part of their member type. */ function buddydev_restrict_group_access_based_on_member_type() { if ( ! is_user_logged_in() || ! bp_is_group() || is_super_admin() ) { return;// it's not group or the user is not logged in, do not restrict. } $group_id = groups_get_current_group()->id; $user_id = bp_loggedin_user_id(); // user's own group, do not restrict. if ( groups_is_user_member( $user_id, $group_id ) ) { return; } // Member types pro is not active, return. if ( ! function_exists( 'bpmtp_member_types_pro' ) ) { return; } // Get all member types for user, user may have multiple member type. $member_types = bp_get_member_type( $user_id, false ); if ( empty( $member_types ) ) { return ; // what should we do? the user does not have any member type. } // let us build a list of group ids allowed with these member types. $group_ids = array(); $active_types = bpmtp_get_active_member_type_entries(); foreach ( $member_types as $member_type ) { // not valid. if ( empty( $member_type ) || empty( $active_types[ $member_type ] ) ) { continue; } $mt_object = $active_types[ $member_type ]; $associate_groups_ids = get_post_meta( $mt_object->post_id, '_bp_member_type_groups', true ); // merge. if ( ! empty( $associate_groups_ids ) ) { $group_ids = array_merge( $group_ids, $associate_groups_ids ); } } if ( ! empty( $group_ids ) && in_array( $group_id, $group_ids ) ) { return;// this group is associated with the member types the user has, so do not restrict. } // Restrict if we are here, $referrer = wp_get_referer(); $referrer = $referrer ? $referrer : site_url( '/' ); // add notice. bp_core_add_message( 'Access restricted', 'error' ); bp_core_redirect( $referrer ); } add_action( 'bp_template_redirect', 'buddydev_restrict_group_access_based_on_member_type' );It will redirect logged in user to previous page if they are not member of the group or is not allowed by member type.
Hope that helps.
- Brajesh Singh on November 10, 2017 at 10:30 pm in reply to: [Resolved] Buddypress Profile order Tab #11660
Hi Tiziano,
Thank you for the patience.Please remove your code snippet that you are already using.
Then, please put this in your bp-custom.php
/** * Reorder BuddyPress profile tabs/navigation. */ function buddydev_reorder_buddypress_profile_tabs() { $bp = buddypress(); $nav = $bp->members->nav; // it's a map of nav items for user profile to their position. $nav_items = array( 'settings' => 10, 'activity' => 20, 'friends' => 30, 'groups' => 40, 'blogs' => 50, 'messages' => 60, 'profile' => 70, ); foreach ( $nav_items as $nav_item => $position ) { $nav->edit_nav( array( 'position' => $position ), $nav_item ); } } add_action( 'bp_setup_nav', 'buddydev_reorder_buddypress_profile_tabs', 999 );That will do it for you.
Hope that helps.
Regards
Brajesh