Shape the future of Social networking with WordPress: Join Project Midnight Sun! The next generation platform for community building with WordPress!

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25318
    Brajesh Singh on in reply to: Group Tabs Creator Pro – tab for specific group #18237

    Hi Hugo,
    We don’t have the functionality to target individual group currently. We do plan to add it in our future updates. Most probably in 2-4 weeks.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25318
    Brajesh Singh on in reply to: [Resolved] Make one page public on site #18233

    Hi Chris,
    I am sorry, I don’t use WPS Hide login. Since the login redirection is not related to the code I have assisted you, I will suggest asking in the relevant plugin’s support forum.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25318
    Brajesh Singh on in reply to: [Resolved] Moderation tools support for posts? #18226

    Thank you. I am looking forward to it.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25318
    Brajesh Singh on in reply to: [Resolved] Make one page public on site #18225

    Hi Chris,
    Are you using any other code for redirect.

    The above code does not apply to logged in user.

    There is a code block that I have put at the top

    
    if ( is_user_logged_in() ) {
     return ;
    }
    

    It simply checks if a user is logged in and if they are, It won’t proceed. You may disable the code and check the same.

    I am not sure what is causing it but it is not the above code.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25318
    Brajesh Singh on in reply to: How to sort Sitewide Gallery #18223
  • Keymaster
    (BuddyDev Team)
    Posts: 25318
    Brajesh Singh on in reply to: [Resolved] How to sort Sitewide Gallery #18221

    Hi Fah Q,
    Please use ‘mpp_main_gallery_query_args’ filter for gallery. Also, by default, ‘order’ is set to ‘DESC’, you might want to set that to ‘ASC’

  • Keymaster
    (BuddyDev Team)
    Posts: 25318

    Hi Daria,

    Thank you for clarifying. Good to know that.

    You can use the following code in bp-custom.php or in your theme’s functions.php

    
    
    /**
     * Restrict members list by member type.
     *
     * @param array $args args.
     *
     * @return array
     */
    function buddydev_filter_by_opposite_member_type( $args ) {
    
    	//  No need to change members listing if the user is not logged in.
    	if ( ! is_user_logged_in() ) {
    		return $args;
    	}
    
    	// Map of visible member types based on the member type.
    	// 'male', 'female' are member type names.
    	$visible_types_map = array(
    		'male'   => 'female',
    		'female' => 'male',
    	);
    
    	$member_type = bp_get_member_type( get_current_user_id(), true );
    
    	// If the user does not have a member type
    	// or if the user does not need the restriction.
    	if ( empty( $member_type ) || empty( $visible_types_map[ $member_type ] ) ) {
    		return $args;
    	}
    
    	$args['member_type'] = $visible_types_map[ $member_type ];
    
    	return $args;
    
    }
    
    add_filter( 'bp_after_has_members_parse_args', 'buddydev_filter_by_opposite_member_type' );
    

    You may want to change the visible map based on the name of your member types.

    It maps member type of the current user to the member type whose users will be visible to them.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25318

    Hi Kino,
    Thank you for posting.

    If you want to hide fields on registration page based on member type, my suggestion will be to use conditional profile field as the normal BuddyPress workflow does not allow it.

    You can set condition based on member type field(try using select dropdown member type field if you plan to go with this strategy).

    A better way is to move fields which are required but should be available based on member type out of the registration form. That is supported by BuddyPress out of the box.

    The problem with this approach is users may skip fields after registration. In past, we have shared code for it and I am planning to release a plugin that you can use to ask users to complete the required profile fields before being able to use the site.

    If you want to go with 2nd strategy, I can prioritise the release of this addon.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25318

    Hi Daria,
    Thank you for purchasing the plugin. I am glad the multisite route is working.

    At the moment, exclusion can be enabled by code. If you want, I can post the code. I am also going to add the feature in the member types pro plugin in next 2-3 days(at most by the end of the day 26th October).
    If you need it today, please let me know and I will share the code.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25318
    Brajesh Singh on in reply to: [Resolved] Moderation tools support for posts? #18208

    HI Richard,
    Thank you for the patience.

    Please upgrade to 1.0.7 and enable posts in General settings and then configure it under the posts panel.

    Please let me know how it goes?
    Regards
    Brajesh