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.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,247 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,796 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,596 questions
0 comments No comments
{count} votes

Accepted answer
  1. AllenXu-MSFT 18,051 Reputation points Microsoft Vendor
    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.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful