0

There is a "Home" link in global navigation of my publishing site which I want to hide. It is not available in "Navigation" in "Site Settings" so I cannot hide it from there.

All the solutions available on internet are about SharePoint 2010/2013 and they are not working for SharePoint 2016. How can I hide that Home link?

EDIT

Here's that element:

<a class="static selected menu-item ms-core-listMenu-item ms-displayInline ms-core-listMenu-selected ms-navedit-linkNode shortpoint-nav-home-link shortpoint-nav-a-selected" accesskey="1" href="/sites/somesite/en/Pages/default.aspx">
    <span class="additional-background ms-navedit-flyoutArrow">
        <span class="menu-item-text" data-original-word="English">Home</span>
        <span class="ms-hidden">Currently selected</span>
    </span>
</a>
  • Are you not able to hide the link using custom css and element selector (of home link)? – Ganesh Sanap Aug 10 at 6:33
  • That's what I am trying to do but I am unable to find unique element selector using which I can hide the home link. – Frank Martin Aug 10 at 6:50
  • try something like a[title^='Home'][class^='ms-Nav-link'] – Ganesh Sanap Aug 10 at 6:59
  • I have mentioned element in my original post. Please check. – Frank Martin Aug 10 at 7:02
  • Try using a.menu-item.shortpoint-nav-home-link {display: none !important}. let me know if this works – Ganesh Sanap Aug 10 at 7:13
1

I add below style in a Altertive CSS file and it works well here.

a.menu-item.shortpoint-nav-home-link {
    display: none !important
}

div#sideNavBox li.static:first-child{
    display: none !important
}

enter image description here

Below is my page element:

enter image description here

And you may have a try JS code:

<script src="https://code.jquery.com/jquery-3.1.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $("div#sideNavBox span:contains('Home')").closest("li").hide();
 
    })
</script>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.