Replies
- Ravi on May 6, 2024 at 6:45 am in reply to: Custom Profile Tabs – new subnav button is not responding #2 #52477
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 - Ravi on May 3, 2024 at 6:34 pm in reply to: [Resolved] How can i show only 10 images in a row without pagination? #52469
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 - Ravi on May 3, 2024 at 5:12 pm in reply to: [Resolved] How can i show only 10 images in a row without pagination? #52467
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 - Ravi on May 3, 2024 at 12:32 pm in reply to: [Resolved] How can i show only 10 images in a row without pagination? #52464
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 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.
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
RaviHello,
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
RaviHello 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
RaviHello 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
RaviHello 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