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.
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?
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
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.
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.
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.
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?
Go to Community Builder -> Theme Editor Setting -> Edit CSS -> Put below code
^ better code to add to CSS (won't leave the thin line from the container) ^
This CSS is also hiding other buttons along with Follow button (ex: Close (X) on dialog)
But it stopped working with the preview. Here is what I replaced it with and it is now working again
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!
The [attribute*=value] selector matches every element whose attribute value containing a specified value.