Tagged: buddypress, group, html, tag
Hi Ekiz,
Please put this in your bp-custom.php/** * Add remove filters to allow more tags. */ function buddydev_add_remove_group_desc_filters() { remove_filter( 'groups_group_description_before_save', 'wp_filter_kses', 1 ); add_filter( 'groups_group_description_before_save', 'bp_groups_filter_kses', 1 ); } add_action( 'bp_loaded', 'buddydev_add_remove_group_desc_filters'); /** * Allow extra tags in group description. * * @param $tags * * @return mixed */ function buddydev_allow_extra_group_desc_tags( $tags ) { $tags['ul'] = array(); $tags['li'] = array(); $tags['strong'] = array(); $tags['b'] = array(); return $tags; } add_filter( 'bp_groups_filter_kses', 'buddydev_allow_extra_group_desc_tags' );
It will allow list and strong/bold tags.
Hope that helps.
Regards
BrajeshHi Ekiz,
I see the problem. You are using ordered list while the code I posted allowed unordered list. I have updated the code to allow ordered list too now/** * Add remove filters to allow more tags. */ function buddydev_add_remove_group_desc_filters() { remove_filter( 'groups_group_description_before_save', 'wp_filter_kses', 1 ); add_filter( 'groups_group_description_before_save', 'bp_groups_filter_kses', 1 ); } add_action( 'bp_loaded', 'buddydev_add_remove_group_desc_filters'); /** * Allow extra tags in group description. * * @param $tags * * @return mixed */ function buddydev_allow_extra_group_desc_tags( $tags ) { $tags['ul'] = array(); $tags['ol'] = array(); $tags['li'] = array(); $tags['strong'] = array(); $tags['b'] = array(); return $tags; } add_filter( 'bp_groups_filter_kses', 'buddydev_allow_extra_group_desc_tags' );
Regards
BrajeshPlease try checking the source page. Some themes may not style it.
Do you see the ul tag in the textarea or does it get removed on update?
That simply means that your theme is not styling it. It should be there if you check the source. You will need to style it to look like the unordered list using css.
The topic ‘ [Resolved] Buddypress Group Description Html tag support?’ is closed to new replies.
This topic is: resolved