BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25211
    Brajesh Singh on in reply to: [Resolved] Show Opposite Gender Base on XProfile #46679

    Hi Catherine,
    Thank you.

    I am glad that it worked.

    You can change this

    
    $query->query_vars['xprofile_query'] = array(
    	array(
    		'field'   => bp_get_xprofile_gender_type_field_id(), // field id or name.
    		'value'   => $opposite_gender,
    		'compare' => '=',
    	),
    );
    
    

    with something like this.

    
    
    $query->query_vars['xprofile_query'] = array(
    	array(
    		'field'   => bp_get_xprofile_gender_type_field_id(), // field id or name.
    		'value'   => $opposite_gender,
    		'compare' => '=',
    	),
    	array(
    		'field'   => 'your_field_id', // field id or name.
    		'value'   => 'the value',
    		'compare' => '=', // your compare operator.
    	),
    
    );
    
    

    You can add as many conditions as you need but I will recommend to be cautious. Xprofile query is not efficient and if you put 4-5 xprofile query clauses, it may cause database load issues. I have seen the issue on a site with moderate number of users couple of years ago.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211

    Hi Ethan,

    Please put this code in your bp-custom.php

    
    /**
     * Force Userinsights plugin to use age instead of date.
     */
    add_filter( 'usin_user_profile_data', function ( $user ) {
    
    	$filed_id = 25; // please change with your birthdate field id.
    
    	$key = "bxp_{$filed_id}";
    
    	if ( $user->{$key} ) {
    		$user->{$key} = xprofile_get_field_data( $filed_id, $user->ID );
    	}
    
    	return $user;
    } );
    

    and make sure to update the field id with the correct field id.

    It will fix the issue. Please let me know if it works for you or not?

    PS:- This is happening due to incorrect implementation of userinsights and I will recommend that you request them to fix it.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211
    Brajesh Singh on in reply to: [Resolved] BuddyBoss Group Activity Moderation #46668

    You are welcome.

  • Keymaster
    (BuddyDev Team)
    Posts: 25211
    Brajesh Singh on in reply to: [Resolved] Show Opposite Gender Base on XProfile #46667

    Hi Catherine,
    Thank you for the reply.
    I am glad that it worked on your local setup.

    Not sure why it is not working on the live server, is there any other plugin using xprofile_query? That could be the reason.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211

    Thank you Chris.
    I am glad that it worked.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211
    Brajesh Singh on in reply to: Move menu item to submenu #46663

    Hi,
    Thank you for the question.
    it is not feasible with BuddyPress . This is a limitation of BuddyPress where views are tied to urls and there is not much we can do about it. Moving url breaks the view.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211
    Brajesh Singh on in reply to: [Resolved] BuddyBoss Group Activity Moderation #46662

    Hi Christopher,

    Thank you for the question.

    The plugin does allow you to have the activities hidden until moderation.

    There is a limitation though. currently, only the moderators(site admin) who have access to WordPress admin dashboard. In other words, Group moderators are not able to moderate the post.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211
    Brajesh Singh on in reply to: [Resolved] Show Opposite Gender Base on XProfile #46661

    Hi Catherine,
    Thank you.

    Cna you please try using this and see if it works?
    https://pastebin.com/mEPhWikK

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211

    Hi Chris,
    Thank you for the patience.

    Please upgrade to 1.1.3. It will filter messages/replies from BuddyPress Better Messages plugin. It does not filter the “subject” line of the BuddyPress Better Message messages thread, as there was no filter available for that.
    https://buddydev.com/plugins/buddypress-profanity-filter/

    Please let me know if it works for you or not?

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211
    Brajesh Singh on in reply to: [Resolved] Show Opposite Gender Base on XProfile #46653

    Hi Catherine,
    Welcome to BuddyDev support forums.
    I am sorry, I could not reply earlier.

    Please share the complete code on pastebin.com and link me here. I will check and update that.

    Regards
    Brajesh