locked
How hide quick links on single page in SharePoint Online RRS feed

  • Question

  • I need to hide the quicklinks that show on the left in every page in SharePoint, for a single page (not the whole site). According to my research, this is done with CSS script. But I cannot add script to the page because the script editor web part is not shown when adding web parts to the page. The fix for that, according to everything I can find, is to change the custom script settings in SharePoint settings so that it allows users to run custom scripts. But that is already configured that way and has been for a long time (so there is no waiting for the setting to take effect). So I am baffled. My questions are:

    1. Is adding CSS script the only way to hide the quicklinks on a page?

    2. Why is the script editor web part not available, even though the custom script settings are correct?

    Wednesday, July 15, 2020 7:29 PM

Answers

  • Hi Margaret A-L,

    To answer your questions:

    1. If you want to hide the quick launch only on a specific page but not on all pages in a site collection then yes, applying custom code would be the only solution.

    2. Please double check if you have enabled custom script at the current site (not at tenant level) by running the following commands:

    $username="<AdminAccount>"
    $password="<Password>"
    $cred=New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $userName, $(convertto-securestring $Password -asplaintext -force)
    Connect-SPOService -Url https://<tenant>-admin.sharepoint.com -Credential $cred
    
    Set-SPOsite "<SiteURL>" -DenyAddAndCustomizePages 0
    

    Make sure you modify all the parameters required before executing.

    After that, check if you can see the Script Editor web part again.

    ---

    This “Microsoft Online: SharePoint Online” Forum will be migrating to a new home on Microsoft Q&A, please refer to this sticky post for more details.

    Best regards,

    Chelsea Wu


    "SharePoint" forums will be migrating to a new home on Microsoft Q&A !
    We invite you to post new questions in the "SharePoint" forums' new home on Microsoft Q&A !

    • Marked as answer by Margaret A-L Friday, July 17, 2020 1:40 AM
    Thursday, July 16, 2020 2:57 AM

All replies

  • Hi Margaret A-L,

    To answer your questions:

    1. If you want to hide the quick launch only on a specific page but not on all pages in a site collection then yes, applying custom code would be the only solution.

    2. Please double check if you have enabled custom script at the current site (not at tenant level) by running the following commands:

    $username="<AdminAccount>"
    $password="<Password>"
    $cred=New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $userName, $(convertto-securestring $Password -asplaintext -force)
    Connect-SPOService -Url https://<tenant>-admin.sharepoint.com -Credential $cred
    
    Set-SPOsite "<SiteURL>" -DenyAddAndCustomizePages 0
    

    Make sure you modify all the parameters required before executing.

    After that, check if you can see the Script Editor web part again.

    ---

    This “Microsoft Online: SharePoint Online” Forum will be migrating to a new home on Microsoft Q&A, please refer to this sticky post for more details.

    Best regards,

    Chelsea Wu


    "SharePoint" forums will be migrating to a new home on Microsoft Q&A !
    We invite you to post new questions in the "SharePoint" forums' new home on Microsoft Q&A !

    • Marked as answer by Margaret A-L Friday, July 17, 2020 1:40 AM
    Thursday, July 16, 2020 2:57 AM
  • Thanks, the code you sent to enable custom script worked on the site and I am now able to add the script editor and add css code. I did not realize that this had to be done at the site level and not just the tenant level. 

    Thanks,

    Margaret

    Thursday, July 16, 2020 5:25 PM
  • Hi Margaret,

    If you find any reply helpful to you, please remember to mark it as answer.

    It will do great help to those who meet the similar question in this forum.

    Thank you for your understanding.

    Best regards,

    Chelsea Wu


    "SharePoint" forums will be migrating to a new home on Microsoft Q&A !
    We invite you to post new questions in the "SharePoint" forums' new home on Microsoft Q&A !

    Friday, July 17, 2020 1:20 AM