How to remove the "Recycle Bin" from the navigation bar on SharePoint without impacting the Navigation menu

Durrell, Rayhaan R 20 Reputation points
2024-01-17T15:05:08.18+00:00

I have tried following this guide: https://www.sharepointdiary.com/2020/04/sharepoint-online-hide-recycle-bin-from-quick-launch.html and this suggestion: https://answers.microsoft.com/en-us/msoffice/forum/all/remove-recycle-bin-from-sharepoint-navigation/fb1aca4d-88ca-408b-a19b-42e2ffbe5125 to remove the "Recycle Bin" from the navigation menu, but both changes the page layout. As soon as I "Activate" the SharePoint Server Publishing Infrastructure, it changes the layout on the navigation bar and removes the ability to have the navigation horizontal instead of vertical.

Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | SharePoint Server | Development
0 comments No comments
{count} votes

Accepted answer
  1. AllenXu-MSFT 24,951 Reputation points Moderator
    2024-01-18T07:19:35.76+00:00

    Hi @Durrell, Rayhaan R,

    Navigation bar will be set to vertical if enabling the "SharePoint Server Publishing Infrastructure" feature in your site and it's not allowed to set the navigation to horizontal. This is by default.

    In this case, you need to inject below CSS using SPFx as said in this article: SharePoint Online: Hide Recycle Bin from Quick Launch to hide the Recycle bin from quick launch and keep the Navigation bar horizontal.

    a[href$="AdminRecycleBin.aspx"] {
        display:none;
    }
    
    
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.