BuddyDev

Search

Replies

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2985

    Hello,

    I have checked it and it conflicts with theme functionality which overrides the default admin meta box layout and converts it to tabbed one. You can use the following code to fix this

    
    add_action( 'admin_enqueue_scripts', function () {
    	$screen = get_current_screen();
    
    	if ( ! isset( $screen->id ) || ! in_array( $screen->id, array( 'bpptc_profile_tab' ) ) ) {
    		return;
    	}
    
    	if ( class_exists('\WGL_Extensions\WGL_Framework_Global_Variables' ) ) {
    		wp_dequeue_style( \WGL_Extensions\WGL_Framework_Global_Variables::get_theme_slug() . '-admin' );
    	}
    
    	wp_dequeue_script( 'wgl-extensions-metaboxes' );
    }, 20 );
    
    

    You can place this bp-custom.php file or your theme “functions.php” file. Please give it a try and let me know if it helps or not.

    Refer this if you do not know what is bp-custom file
    https://buddydev.com/docs/buddypress-guides/what-is-bp-custom-php/

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2985

    Hello Benny,

    For groups media use component=”groups” and for recent media orderby=”modified” attribute for photo media only you can use type=”photo” as well for e.q.

    [mpp-list-media component=”groups” orderby=”modified” nopaging=1 column=12]

    try like this.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2985

    Hello Benny,

    Try the following shortcode. List all gallery media per row 12 media items

    
    // Replace gallery_id with your gallery id.
    [mpp-list-media gallery_id="92" nopaging=1 column=12]
    
    

    PS: nopaging: Please avoid it as It can lead to degraded performance.

    Shortcode documentation: https://buddydev.com/mediapress/shortcodes/mpp-list-media/

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2985

    Hello Benny,

    Welcome to the BuddyDev Forums. MediaPress does have a setting with the name “How many media per row?”. You can locate it under MediaPress > Settings > Theming > Display Settings with a try with the value 12. it will list 12 media per row. Please give it a try.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2985
    Ravi on in reply to: Post excerpt #52462

    Hello Scooter,

    Thank you for posting. If you are familiar with PHP you can use the function name “wp_trim_excerpt” to generate. If you want me to assist you with the code let me know.

    Regards
    Ravi

    • This reply was modified 2 weeks, 2 days ago by Ravi.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2985
    Ravi on in reply to: [Resolved] Create activity search form #52461

    Hello Sunny,

    Try the following way:

    
    <?php if ( function_exists( 'bp_is_activity_directory' ) && bp_is_activity_directory() ) : ?>
        <?php echo do_shortcode('[bp-activity-search-form]'); ?>
    <?php endif; ?>
    
    

    Give it a try.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2985
    Ravi on in reply to: Buddypress Clear Notifications Plugin #52460

    Hello,

    Thank you for posting here. I have checked it with “BuddyPress 12.4.1” and it is working fine so you can use it without any issues. Please give it a try.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2985
    Ravi on in reply to: [Resolved] Create activity search form #52446

    Hello Sunny,

    Thank you for the acknowledgement. You can use the ‘bp_is_activity_directory’ function to make sure it shows only on the activity directory page. Please give it a try.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2985
    Ravi on in reply to: [Resolved] Create activity search form #52401

    Hello Sunny,

    Thank you for the acknowledgment. Please place the following code in the “bp-custom.php” file or your active theme “functions.php” file.

    
    add_shortcode( 'bp-activity-search-form', function ( $atts ) {
    
    	if ( ! function_exists( 'bp_get_activity_directory_permalink' ) ) {
    		return '';
    	}
    
    	$atts = shortcode_atts(
    		array(
    			'label'     => __( 'Search Activities', 'bp-custom' ),
    			'btn_label' => __( 'Search', 'bp-custom' ),
    		),
    		$atts
    	);
    
    	ob_start();
    
    	?>
    	<div class="bp-activity-search-form">
    		<?php if ( $atts['label'] ) : ?>
    			<h4><?php echo esc_html( $atts['label'] ); ?></h4>
    		<?php endif; ?>
    		<form action="<?php echo esc_url( bp_get_activity_directory_permalink() ); ?>" method="get">
    			<input type="text" name="s">
    			<input type="submit" class="button" value="<?php echo esc_attr( $atts['btn_label'] ); ?>">
    		</form>
    	</div>
    	<?php
    
    	return ob_get_clean();
    } );
    
    

    Please use the shortcode “[bp-activity-search-form]”. It only works with the activity directory page. Please give it a try and let me know.

    To more info on “bp-custom.php” check here: https://buddydev.com/docs/buddypress-guides/what-is-bp-custom-php/

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2985
    Ravi on in reply to: [Resolved] Create activity search form #52358

    Hello Sunnybuddy,

    Thank you for the acknowledgement. As you said you are using the older BuddyPress which is why there is no activity search form in the latest version you can find it on the Activity directory page. But to check whether activity search is supported on your setup just try to add “?s=text-to-search” with the URL on the directory page and check whether it shows results or not. If it shows the expected result you can create a search form using HTML and make it searchable.

    Please give it a try.

    Regards
    Ravi