Hello,
I see that if I enable category selection with a post, each category is listed on the form with a checkbox next each. This is too long as I have many.
Can this be changed? If so, how? Ideally, I’d like a dropdown select with only one selection possible.
Thanks
Hello Cameron,
Please try the following code it will list all taxonomies in dropdown.
add_filter( 'buddyblog_post_form_settings', function ( $settings ) { if ( buddyblog_get_option( 'enable_taxonomy' ) ) { $taxonomies = array(); $tax = buddyblog_get_option( 'allowed_taxonomies' ); if ( ! empty( $tax ) ) { foreach ( (array) $tax as $tax_name ) { $taxonomies[ $tax_name ] = array( 'taxonomy' => $tax_name, 'view_type' => 'dd', ); } } if ( ! empty( $taxonomies ) ) { $settings['tax'] = $taxonomies; } } return $settings; } );
Place this code in your ‘bp-custom.php’ file.
For ref: https://buddydev.com/docs/buddypress-guides/what-is-bp-custom-php/
Regards
Ravi
Viewing 5 posts - 1 through 5 (of 5 total)
The topic ‘ [Resolved] Categories – Dropdown Rather than Select’ is closed to new replies.
This topic is: resolved