function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kasulabad AishwaryaKasulabad Aishwarya 

How to remove "+Follow" button from the "record banner" of "Account" page in Community ?

Raj VakatiRaj Vakati
 you cannot remove the Follow button from the page layout. If Feed Tracking is ON for the object, users can Follow the record.  The only way to remove the button is to turn off Feed Tracking for that object under Setup > Feed Tracking.
You can hide through custom CSS go through the below steps
  • go to community builder
  • go to theme editor setting 
  • click on edit CSS
User-added image
  • Add below CSS to the css editor
    span[title='Follow'], .slds-button .slds-icon-utility-add {display: none}
    span[title='Following'], .slds-button .slds-icon-utility-check {display: none}
    span[title='Unfollow'], .slds-button .slds-icon-utility-close {display: none}

Alex Skempris 33Alex Skempris 33
Hi Dheeraj

That was a good suggestion but doesn't work unfortunately. It seems to be leaving a grey line trail. Any suggestions on how to hide that little leftover?

User-added image
awinash kumarawinash kumar
At present, There is no feature provided by Salesforce to hide/unhide the follow button in communities if chatter feed is enabled (as mentioned in earlier answers). However you can make use of global CSS override in the community.

Go to Community Builder -> Theme Editor Setting -> Edit CSS -> Put below code
div[class="slds-page-header slds-page-header_record-home forceHighlightsStencilDesktop forceRecordLayout"] div[role="group"] button:first-of-type {display: none;}

Brian Schwartz 835Brian Schwartz 835
.slds-button.slds-button--neutral.not-selected.slds-not-selected {display:none} {display:none}

^ better code to add to CSS (won't leave the thin line from the container) ^
Basavaiah RaviBasavaiah Ravi
This CSS is also hiding other buttons along with Follow button (ex: Close (X) on dialog)
For those of us that are less developer, here's what I added.  Please correct me if it's wrong.
/*Hide follow button on record pages*/

span[title='Follow'], .slds-button.slds-button--neutral.not-selected.slds-not-selected {display:none}
span[title='Following'], .slds-button.slds-button--neutral.not-selected.slds-not-selected {display:none}
span[title='Unfollow'], .slds-button.slds-button--neutral.not-selected.slds-not-selected {display:none}
span[title='Follow'], {display:none}
span[title='Following'], {display:none}
span[title='Unfollow'], {display:none}

Aubrey HillAubrey Hill
This was one of the first things we found with Spring '23 preview -- we already had implemented the following previous to the preview
span[title='Follow'], .slds-button.slds-button--neutral.not-selected.slds-not-selected, .slds-icon-utility-add {display:none}
span[title='Following'], .slds-button.slds-button--neutral.not-selected.slds-not-selected, .slds-icon-utility-check {display:none}
span[title='Unfollow'], .slds-button.slds-button--neutral.not-selected.slds-not-selected, .slds-icon-utility-close{display:none}

But it stopped working with the preview. Here is what I replaced it with and it is now working again
span[title='Follow'], .slds-button.slds-button--neutral.uiButton {display:none !important;}
span[title='Following'], .slds-button.slds-button--neutral.uiButton {display:none !important;}
span[title='Unfollow'], .slds-button.slds-button--neutral.uiButton {display:none !important;}

Nancy Brown 48Nancy Brown 48
For some reason the previous solution, cause the 'Cancel', 'Save & New' and 'Save' button to disappear when trying to create any new record. I am not a CSS person but I thought the connection was strange so we had to remove it.
Oleg LitvinovOleg Litvinov

I've tried to paste the code @Aubrey Hill proposed:
span[title='Follow'], .slds-button.slds-button--neutral.uiButton {display:none !important;}
span[title='Following'], .slds-button.slds-button--neutral.uiButton {display:none !important;}
span[title='Unfollow'], .slds-button.slds-button--neutral.uiButton {display:none !important;}

But now it looks like it removed all default settings for profiles, permissions sets and field-level security. All the buttons and fields that shouldn't be on the page are now appeared. 

Any thoughts?

シン キソブシン キソブ

Below code works for me. Specifically targets FOLLOW button on that object regardless if it is already selected or not. Hope it helps!

div[data-target-selection-name="sfdc:StandardButton.Account.Follow"] {display:none !important;}
Mala Verma 1Mala Verma 1
Chase PriceChase Price
The below CSS will hide all Follow buttons, including the button container, regardless of object.
The [attribute*=value] selector matches every element whose attribute value containing a specified value.
div[data-target-selection-name*='.Follow'] {
    display: none;
Stephen GuzmanStephen Guzman
@chasePrice, your solution worked for me. Thank you for sharing!