Replies
- Brajesh Singh on July 25, 2018 at 2:07 pm in reply to: [Resolved] Hide a specific post category in the activities #16491
Please put the following code to your bp-custom.php
/** * Disable recording posting from a specific category to BuddyPress activity * * @param bool $enabled allow posting? * @param int $blog_id blog id. * @param int $post_id post id. * @param int $user_id user id. * * @return bool */ function buddydev_disable_category_post_from_activity_recording( $enabled, $blog_id, $post_id, $user_id ) { $category_id = 165; $taxonomy = 'category'; if ( has_term( $category_id, $taxonomy, $post_id ) ) { // I could use has_category() but has_terms can be a better example for future customization. $enabled = false; } return $enabled; } add_filter( 'bp_activity_post_pre_publish', 'buddydev_disable_category_post_from_activity_recording', 10, 4 );It will disallow any future recording of posts from that category. It won’t change the activity for already recorded posts though.
Please test and let me know if it works for you or not?
Regards
Brajesh - Brajesh Singh on July 25, 2018 at 1:50 pm in reply to: Limit private messages for PaidMembership Users #16488
Hi Velli,
We don’t offer any solution for the above combination.We do have a message rate limiter(It will not work with Nouveau template).
https://buddydev.com/plugins/bp-private-message-rate-limiter/You may want to customize it or hire someone to do it for you.
Regards
Brajesh - Brajesh Singh on July 25, 2018 at 1:48 pm in reply to: [Resolved] Hide a specific post category in the activities #16487
Hi Velli,
Please share the post type(is it post or a custom post type?) and category(term) id.Regards
Brajesh - This reply has been marked as private.
You are welcome.
Please be aware that using BP better Message will cause a lot of stress on database(too many queries per page in the current version).
- Brajesh Singh on July 25, 2018 at 1:13 pm in reply to: [Resolved] Featured Member: time limit option #16483
Hi Herve,
I will do a re-test today and will get back to you.PS:- In future, If you do not want to wait for the cron to test, you can use the cron control to manually trigger and call the hooked function.
- Brajesh Singh on July 25, 2018 at 1:09 pm in reply to: [Resolved] Xprofile show age in "members-loop" #16482
Hi Theo,
I am sorry I could not reply earlier.Please use this
<?php echo xprofile_get_field_data( "Age", bp_get_member_user_id() );?>For members loop. The problem with it does not seem to be applying the display filter.
Using xprofile_get_field_data works.
Regards
Brajesh - Brajesh Singh on July 25, 2018 at 1:04 pm in reply to: [Resolved] Buddypress Moderations Tools – 1000 erros #16481
Please upgrade to 1.0.2
It was an old habit of me. PHP dropped support for static abstract a few years ago. The error is generated when php runs in strict mode. It does work in non strict mode.
Have fixed it now.
Regards
Brajesh - Brajesh Singh on July 25, 2018 at 11:40 am in reply to: [Resolved] Allow creating galleries only to role admin #16476
Hi Ravi,
Please do link to the original threads in future.Here is it for reference
https://buddydev.com/support/forums/topic/creating-galleries-only-to-role-admin/
Regards
Brajesh Hi Nabeel,
I am sorry but I don’t see any proper way. Unless BuddyPress sorts out context issue, it will always be problematic to use multiple loops on the same page as one will affect other.Most probably adding &search_terms= may fix it but I am not 100%sure.