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
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Change Default Text #31614

    Hello Steven,

    Thank you for posting. Please refer the following link:

    https://codex.buddypress.org/getting-started/customizing/customizing-labels-messages-and-urls/

    Please let me know if it helps you or not.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Shortcode Activity – Limit the activity content #31613

    Hello Michel,

    You can put this code in ‘bp-custom.php’. Please check the following url

    https://buddydev.com/docs/buddypress-guides/what-is-bp-custom-php/

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Shortcode Activity – Limit the activity content #31603

    Hello Michel,

    Thank you for posting. BuddyPress provides a filter to control the excerpt length. Use the following code

    
    /**
     * Modify excerpt length. Return no. of characters in activity excerpt.
     *
     * @param int $length Length.
     *
     * @return int
     */
    function buddydev_modify_excerpt_length( $length ) {
    	$length = 100;
    
    	return $length;
    }
    add_filter('bp_activity_excerpt_length', 'buddydev_modify_excerpt_length' );
    
    

    Please check.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Default page when an user is logged #31353

    Hello Granmeh,

    Thank you for posting. On WordPress plugin directory there is a plugin with name “Login and Logout Redirect” which allows site admin to redirect users on login or logout to custom url. Please have a look.

    Plugin Link: https://wordpress.org/plugins/login-and-logout-redirect/

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] Buddypress Activity Shortcode comments #31164

    Hello Johnny,

    Thank you for posting. I have tested and it is working fine for me comment posted on a post showing in activity generated using ‘[activity-stream]’ shortcode. Please share your shortcode you are using to generate activity. Also, please do let me know you have enabled “Site Tracking” module in BuddyPress settings and comment is not in moderation.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Adding Xprofile fields to Recent Visitors directory? #31163

    Hello Carsten,

    Try the following way to show specific field data. It will only show if data is not empty for the user.

    
    
    /**
     * Adding extra content to member's directory
     */
    function buddydev_recent_visitors_extra_content() {
    
    	if ( ! bp_is_active( 'xprofile' ) ) {
    		return;
    	}
    
    	// Show data from following fields.
    	$fields = array( 2, 3 );
    
    	$user_id = bp_get_member_user_id();
    
    	foreach ( $fields as $field_id ) {
    		$field = xprofile_get_field( $field_id, $user_id );
    
    		if ( ! empty( $field->data->value ) ) {
    			echo $field->name . ': ' . $field->data->value . "</br>";
    		}
    	}
    }
    
    add_action( 'bp_directory_members_item', 'buddydev_recent_visitors_extra_content' );
    
    

    Please let me know if it works or not.

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Hide a member type in Profile Search Forms #31160

    Hello Ramon,

    Sorry for the inconvenience. Please look the following documentations

    https://codex.buddypress.org/themes/bp-custom-php/

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Hide a member type in Profile Search Forms #31157

    Hello Ramon,

    Thank you for the acknowledgement. Please try the following code to exclude specfic member-types from member directory search form field I am supposing you are using “BP Profile Search”

    
    
    /**
     * Excluded member type form form
     *
     * @return array
     */
    function buddydev_search_excluded_member_types() {
    	// Enter member type name you want to exclude.
    	return array( 'Teacher' );
    }
    
    add_action( 'bps_edit_field', function ( $field ) {
    
    	if ( 'bp_member_type' != $field->code || empty( $field->options ) ) {
    		return $field;
    	}
    
    	$field->options = array_diff( $field->options, buddydev_search_excluded_member_types() );
    } );
    
    

    Use this code in you bp-custom.php file and let me know if it works or not.

    Regards
    Ravi

    • This reply was modified 6 years, 4 months ago by Ravi.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Adding Xprofile fields to Recent Visitors directory? #31153

    Hello Carsten,

    No, It is only for Recent Visitors tab only if you want to use it globally for all tabs just remove the following code.

    
    if ( ! function_exists( 'visitors_is_visitor_scope' ) || ! visitors_is_visitor_scope() ) {
    		return;
    	}
    
    

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Hide a member type in Profile Search Forms #31151

    Hello Ramon,

    Thank you for posting. Please let me know do you want to hide some member-types from member type dropdown generated by the Profile search form.

    Regards
    Ravi