We have to override the template to remove the "Public" option. Please follow the steps below.
1. You will find the JS template from the BuddyBoss Platform on this path - buddyboss-platform/bp-templates/bp-nouveau/buddypress/common/js-templates/activity/parts/bp-activity-post-case-privacy.php
2. To override this template, you must copy that file into your child theme with this path -buddyboss-theme-child/buddypress/common/js-templates/activity/parts/bp-activity-post-case-privacy.php.
3. Copy the code below to your bp-activity-post-case-privacy.php or copy the attached file to avoid confusion.
<script type="text/html" id="tmpl-activity-post-case-privacy">
<div id="bp-activity-privacy-point" class="{{data.privacy}}" data-bp-tooltip-pos="up" data-bp-tooltip="<?php esc_html_e( 'Set by album privacy', 'buddyboss' ); ?>">
<span class="privacy-point-icon"></span>
<span class="bp-activity-privacy-status">
<# if ( data.privacy === 'loggedin' ) { #> <?php esc_html_e( 'All Members', 'buddyboss' ); ?> <# } else if ( data.privacy === 'friends' ) { #> <?php esc_html_e( 'My Connections', 'buddyboss' ); ?> <# } else if ( data.privacy === 'onlyme' ) { #> <?php esc_html_e( 'Only Me', 'buddyboss' ); ?> <# } else { #> <?php esc_html_e( 'Group', 'buddyboss' ); ?> <# } #>
</span>
<i class="bb-icon-f bb-icon-caret-down"></i>
</div>
</script>
4. Kindly make sure to add the codes we have provided before on your Child theme functions.php:
/*****************************
* Remove Public view on the Activity page
******************************/
function custom_login_css() { echo '<style type="text/css"> #loginform input[type=email], #loginform input[type=text], #loginform input[type=password] {color: #000000!important;}</style>'; } add_action('login_head', 'custom_login_css');
Use this CSS to hide it from privacy options.
Please follow the steps below:
1. Go to BuddyBoss > Theme Options
2. Under Custom Codes, enable CSS
3. Append the following:
4. Save changes.
Note: Any modifications are considered as custom work already. Know more about our Support policy here: https://www.buddyboss.com/support-policy/
Did you find it helpful? Yes No
Send feedbackSorry we couldn't be helpful. Help us improve this article with your feedback.