Replies
- Brajesh Singh on October 6, 2018 at 9:33 am in reply to: Activating BuddyPress Friends Suggest make all profil avatars disappear #17902
Hi Carsten,
Jetpack’s lazyload as well as some other lazy load plugins are known to break BuddyPress profile photo upload.
What I don’t see is how the Friend suggest is breaking anything.
Please see what I see on my system using Nouveau template pack.
In your case, It is something else as we do not include any css with the plugin. And the js code is scoped to work inside “.suggested-friend-item-list” and “#members-suggestion-list”.
Regards
Brajesh - Brajesh Singh on October 6, 2018 at 8:38 am in reply to: [Resolved] [Blog categories for groups] Blogs are visible in Google! #17899
Hi Hugo,
That’s correct.You can make any post invisible from stream by adding the meta key
_is_bcg_postBut in order to properly redirect(If a post is accessed directly), we need the associated group too.
That should be stored as the numeric value in another meta
_bcg_group_idSo, if you are importing, please make sure to have these two values.
Regards
Brajesh - Brajesh Singh on October 6, 2018 at 8:08 am in reply to: [Resolved] Allow user to upload images #17896
Hi Saxena,
I will be off, so unable to check right now.Please use the private reply to share a temporary user account to allow me check it later.
Thank you
Brajesh - Brajesh Singh on October 6, 2018 at 8:03 am in reply to: [Resolved] Buddypress search buttons are not working? #17894
Hi Kerem,
It is most probably a theme issue. I will suggest asking to theme support for the same.Regards
Brajesh - Brajesh Singh on October 6, 2018 at 8:02 am in reply to: [Resolved] Allow user to upload images #17893
Ok.
I will check the global shared plugin in 2-3 hours and update you. - Brajesh Singh on October 6, 2018 at 7:56 am in reply to: Activity Shortcode Plugin – Ajax Posts #17890
Hi David,
Which theme and template pack are you using? This is incorrect behaviour. Most probably a conflict. Please let me know the theme and the template pack and I will assist.Regards
Brajesh - Brajesh Singh on October 6, 2018 at 7:55 am in reply to: [Resolved] [Blog categories for groups] Blogs are visible in Google! #17889
Hi Hugo,
Please add it in your bp-custom.php
/** * Redirect to group post if needed. */ function buddydev_redirect_to_group_post() { if ( ! function_exists( 'bcg_get_post_type' ) || ! is_singular( bcg_get_post_type() ) ) { return; } $post_id = get_queried_object_id(); $group_id = get_post_meta( $post_id, '_bcg_group_id', true ); if ( $group_id && ! bp_is_group() ) { $post = get_post( $post_id ); $permalink = bp_get_group_permalink( groups_get_group( $group_id ) ) . BCG_SLUG . '/' . $post->post_name; bp_core_redirect( $permalink, 301 ); } } add_action( 'bp_template_redirect', 'buddydev_redirect_to_group_post' ); /** * Exclude the group posts from everywhere else. * * @param WP_Query $query query object. */ function buddydev_filter_out_bcg_posts( $query ) { if ( is_admin() || ! function_exists( 'bcg_get_post_type' ) ) { return; } // Not our post type or inside the group. if ( bcg_get_post_type() != $query->get( 'post_type' ) || bp_is_group() ) { return; } $args = $query->query_args; if ( isset( $args['meta_query'] ) ) { $meta_query = $args['meta_query']; } else { $meta_query = array(); } // now, we add our own condition. $meta_query[] = array( 'key' => '_is_bcg_post', 'value' => '1', // not needed. 'compare' => 'NOT EXISTS', ); $query->set( 'meta_query', $meta_query ); } add_action( 'pre_get_posts', 'buddydev_filter_out_bcg_posts' );Please do note that it does not check for categories. Instead, It checks if the post was created from group interface and does the needed.
Regards
Brajesh - Brajesh Singh on October 6, 2018 at 7:15 am in reply to: [Resolved] Allow user to upload images #17887
Hi Saxena,
Are you sure the users have permission to upload in those galleries? On a user with permission will see the add media option on the gallery?How are you giving permissions to the user for a gallery?
Regards
Brajesh - Brajesh Singh on October 6, 2018 at 6:39 am in reply to: Disabling WordPress Admin Bar except Buddypress Notifications #17885
Hi Kerem,
Thank you for asking.
Please use the following code
/** * Disable all items from adminbar except the BuddyPress User Menu and notifications for the logged in user. */ function buddydev_remove_adminbar_items() { global $wp_admin_bar; if ( ! is_user_logged_in() || ! is_admin_bar_showing() ) { return; } $nodes = $wp_admin_bar->get_nodes(); if ( empty( $nodes ) ) { return; } foreach ( $nodes as $node_id => $node ) { if ( $node->parent ) { continue;// we will only remove top leel nodes. } if ( 'top-secondary' !== $node_id ) { $wp_admin_bar->remove_node( $node_id ); } } // Comment this line to keep search in the admin bar. $wp_admin_bar->remove_node( 'search' ); } add_action( 'wp_before_admin_bar_render', 'buddydev_remove_adminbar_items', 2000001 );That will do it.
- Brajesh Singh on October 6, 2018 at 6:18 am in reply to: Activating BuddyPress Friends Suggest make all profil avatars disappear #17884
Hi Carsten,
I don’t think that any issue is caused by the BP Friends suggest. Please use WP Staging plugin to create a staging environment and then check again.Like I showed you in my tests earlier, I don’t see the issue. If you can help me reproduce it, I will provide a solution.
Regards
Brajesh