Hide the primary menu on a single page

Is there a code snippet for hiding the primary menu on a single page in Sydney Pro?

Hello there,

The below CSS code hides the main menu site-wide:


.site-header .col-md-8 {
  display: none;
}

To hide on specific page, you can use page ID. For example:


.page-id-464 .site-header .col-md-8 {
  display: none;
}

464 is the page ID. If you don’t know how to get it, edit your respective page, see the web browser’s address bar. Usually it displays something like this:


yoursite.com/wp-admin/post.php?post=464&action=edit

To apply apply extra custom CSS code to your site, you can add it to Appearance > Customize > Additional CSS from dashboard.

Regards,
Kharis

Thank you the solution worked perfectly.

You’re welcome!

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis

Hello

Iam using custom links on my home page. (jump links)
I have a blog and if you go to the posts page, the jump links don’t work of course. So I’m thinking I should hide the primary menu and add a side menu to the post page to bring you back to the home page or add a button.

I’ve tried your above suggestion to hide the menu on the post pages( which all have same id) but it doesn’t work.

page-id-144 .site-header .col-md-8 {
display: none;
}

Any ideas please? Thank you Jen

Hello there,

For post pages, use this code:

    .single .site-header .col-md-8 {
      display: none;
    } 

Regards,
Kharis

1 Like

Hello Kharis,

everything works fine, for the single page and also the post page.

BUT: not for the my-blog page. The menu ist still there with both methods.

Example, if i click on the main page in the sector “Latest News” on the button “SEE ALL OUR NEWS”.
By the way, how can i delete that button? it’s not possible with page builder on the mainpage.

Another question related to the Menu: i saw on you demo site, if i click on blog, i am comming directly to the my-blog page. if i click on that page on “About” there is no problem to get back to the “One-Page” for me its not working. Thats the reason why i want get rid of the menu.
On your page on my-blog page the link in the browsers address bar shows: demo.athemes.com/sydney/#pg-8-2 same as on the main page.

In my case, on my-blog page the link in the browsers address bar shows: websitexyz.de/my-blog/#blog and on the main page websitexyz.de/#blog ?? Thats weird… what i did wrong, any idea?

Well, i can do an absolute path, but then the site is loading again…

Thanks in advance, regards, Uwe

Hello there,

To hide the latest news button, add this extra custom CSS code:

    .widget[class*="widget_sydney_latest_news_"] .more-button {
      display: none;
    } 

To make one-page-scrolling-menu also works on other pages like blog, use this URL format for custom link type of menu set in the menu administration panel (Appearance > Menus).

yoursite.com/#element_ID_name

Regards,
Kharis

Thanks Kharis.

Regards, Uwe

You’re welcome Uwe!

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis