+2 votes
by
You need that on the main page of the site is not displayed in the main menu item "Home", but displayed on other pages of the site.
by
It makes more sense to hide it on the back.

4 Answers

0 votes
by
const url_keyword=window.location.pathname
if(url_keyword === "/"){
// скрываешь блок
}
0 votes
by
WP puts page-specific classes on the body. Therefore, you can hide any menu item with code like this:
body.home nav li.you-custom-class {
display: none;
}
0 votes
by
If WP, then check home_url those our domain for any pages, if regular site, then JS check the address strictly to our domain
0 votes
by
We need to pull the name of the URL and depending on it prescribe the logic
...