New
PeoplePress is here. Community building for WordPress, reimagined. Fast, modern, and built for the communities you've always wanted to run.
See it live

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: [Resolved] Adding Widget Area #22230

    Hi Jessica,
    Can you please give it a try and se eif it works?

    
    
    /**
     * Register widgets.
     */
    function buddydev_custom_theme_register_widgets() {
    
    	register_sidebar( array(
    		'name'          => 'IGMR Before Container Area',
    		'id'            => 'igmr_before_container_area',
    		'description'   => __( 'Displays above container', 'text_domain' ),
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
    		'after_widget'  => '</div>',
    		'before_title'  => '<h3 class="widgettitle">',
    		'after_title'   => '</h3>'
    	) );
    }
    
    add_action( 'widgets_init', 'buddydev_custom_theme_register_widgets' );
    
    function igmr_widget_area_above_container() {
    
    	if ( is_active_sidebar( 'igmr_before_container_area' ) && is_singular( array( 'post', 'page' ) ) ) : ?>
    		<div id="above-container" class="inner clearfix">
    			<section id="above-container-area">
    				<?php dynamic_sidebar( 'igmr_before_container_area' ); ?>
    			</section>
    		</div>
    
    		<!-- #above-container -->
    
    	<?php endif;
    
    }
    
    add_action( 'cb_before_container', 'igmr_widget_area_above_container' );
    
    

    In the previous code you shared, it seems that was a misplaced bracket ‘}’

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: BP Rate Limit Private Message issues #22229
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: [Resolved] Breadcrumbs #22228

    Hi Jessica,
    Thank you for sharing.

    No, There is no special benefit. I personally try to avoid monolithic plugins with too many features and keep single feature focused plugins. That helps when I need to change a plugin for some reason.

    There is no difference usability wise for WordPress.

    PS:- If you are using Breadcrumb trails, we enhance it by adding support for BuddyPress.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: [Resolved] Delete all notifications #22227

    Hi Artyom,
    Thank you for using the plugin.

    Please use BuddyPress Notifications Widget. That will work for all your users as it does not need admin bar and it has the ability to let users clear notifications.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Hi Rick,
    Thank you for the kind words and confirming that the code works.

    Since role can be passed as the parameter in add_user_to_blog(), it is doable when the need comes.

    I do not use the specific plugin for registration, so you can show my code to the author of the plugin and they can update it with the actual role from their form(It should be 1 line change).

    I used subscriber as a safe bate, the right thing would have been to use get_option(‘default_role’) which picks the default role for current blog.

    We do not need to worry about multiple roles, they should work as expected.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: [Resolved] Hide Members directory in Groups #22225

    Hi Vivek,
    Thank you.

    Please use this snippet in your bp-custom.php

    
    /**
     * Hide Group members for everyone except Site Admin, Group admin and group mods.
     */
    function buddydev_custom_disable_group_members() {
    
    	if ( ! bp_is_group() ) {
    		return;
    	}
    	$group_id = bp_get_current_group_id();
    	$user_id  = get_current_user_id();
    
    	if ( is_super_admin() || groups_is_user_admin( $user_id, $group_id ) || groups_is_user_mod( $user_id, $group_id ) ) {
    		return;
    	}
    
    	bp_core_remove_subnav_item( groups_get_current_group()->slug, 'members' );
    }
    
    add_action( 'groups_setup_nav', 'buddydev_custom_disable_group_members' );
    
    

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: [Resolved] Repeated & Duplicated fields #22224

    Hi Vivek,
    Thank you for clarifying.

    I am not sure of the right way to do it. It is possible to force BuddyPress to show a field in both group but the effort does not seem justified and will need a lot of testing.

    Creating 2 fields and syncing data from 1 to another is another possibility too. That way, since the values will be same, you can use search on any of these. It will still need filtering out field id on profile view.

    Another approach will be to create a basic tab with number/name etc and then use the other 2 tabs for specific things.

    If you want to go with second approach, Please do let me know.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Hi Michaël,
    Please use Profile Visibility Manager and hide the user. This plugin works with profile visibility manager. If a profile is hidden, Their visit is not shown.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: [Resolved] Breadcrumbs #22205

    Hi Jessica,
    If you activate Breadcrumb NavXT or Breadcrum Trail plugin , the breadcrumbs will be visible automatically.

    To disable, please put this in your child theme’s functions.php

    
    add_filter( 'cb_breadcrumb_enabled', '__return_false');
    
    

    Regards
    Brajesh