Hiding “whats-new-form” in member activity but NOT in Groups

Closed
REHub - Price Comparison, Affiliate Marketing, Multi Vendor Store, Community Theme REHub - Price Comparison, Affiliate Marketing, Multi Vendor Store, Community Theme April 08, 2022
Login to reply
Igor Sunz Support Agent
2 years ago

Theme doesn't use any template packs. You can find theme's templates in
buddypress folder of theme

Jiří Výchopeň
2 years ago

I have a script for "BP Nouveau template pack" which unfortunately doesn't work. What pack is used for the template?

/**

 * Filter ajax post request

 */

function buddydev_restrict_post_update() {

 // Always allow site admin.

 if ( is_super_admin() ) {

  return;

 }

 $object = empty( $_POST['object'] ) ? '' : sanitize_key( $_POST['object'] );

 // Allowed user ids.

 $allowed_user_ids = array( 10 );

 if ( 'user' == $object && ! in_array( get_current_user_id(), $allowed_user_ids ) ) {

  wp_send_json_error( array( 'message' => __( 'You are not allowed to post activity.' ) ) );

 }

}

add_action( 'wp_ajax_post_update', 'buddydev_restrict_post_update', 9 );

Igor Sunz Support Agent
2 years ago

This is technically possible but requires more deep customization which we can’t provide as part of regular support. You can hire our developers to make child theme for you. Price will be $30 for this task

Jiří Výchopeň
2 years ago

Hello,

Would it be possible to make #whats-new-form visible only to a specific user?

I want to be able to add information as a single user on Activities (buddypress). Or if there is some other way to post information on Activities?

Thank you.

Jiří Výchopeň
2 years ago

great, it works thanks.

Igor Sunz Support Agent
2 years ago

.my-account #whats-new-form{display:none !important}

you can place this in theme options - general options - custom css

Jiří Výchopeň commented privately
Igor Sunz Support Agent
2 years ago

Please, provide all required information

test account for site

direct link on page where you want to have form and where you don't want to have it

Jiří Výchopeň
2 years ago

Hello,

can you advise me how to disable the “whats-new-form” in activities but not in groups? In groups it should still be visible so users can post.

I found this

div#item-body[role=main] form#whats-new-form {

display: none;

}

here https://buddypress.org/support/topic/solution-for-hiding-whats-new-form-in-member-activity-but-not-in-groups/ but unfortunately it doesn’t work.

Thank you

Regards

Additional Info

Link on page with issue: https://test2.grafan.cz/