Home>Support>Differant menu on Blog page

Differant menu on Blog page

Hi
I use the Vantage theme ******

Whilst learning I understand how to build a menu etc that goes across all pages.

I found the code below on your forum to remove the menu from a particular page.

.page-id-2 .main-navigation {
display: none;
}

My question is I have created a secondary menu that I would like to use on the Blog page only.

Is that possible? If it is how would I adjust the code?
For reference the new menu is call “Category”

Many thanks for all your fantastic support and theme.

James (UK)

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 5 years, 3 months ago Andrew Misplon
    Hi, I Work Here

    Hi James

    Thanks for reaching out. If you’re up for learning a tiny bit of PHP syntax, I recommend using: https://wordpress.org/plugins/menu-items-visibility-control/.

    For our Corp theme, I briefly touch on using this plugin: Page: One Page Website.

  2. 5 years, 3 months ago Simo

    Hi Andrew,

    Many thanks for the quick reply.
    I had already installed the menu items visibility but struggled to find the code to set it up for desired effect. That is why I hoped the CSS I inserted in my message that removes it from the specified page could be edited to say the menu name to be displayed instead of the primary.

    Fingers cross but any further help is always welcome.

    Thank you for a wonderful product that I will probably upgrade to when I understand a bit more.

    Simos

  3. 5 years, 3 months ago Andrew Misplon
    Hi, I Work Here

    Hi, thanks for your support :)

    Perhaps read the section I wrote here: Page: One Page Website. You’re trying to do the same thing. My advice there will apply. For all the menu items you don’t want on your blog page, you include one condition. For all the menu you do want on your blog page you include another condition.

    You can get the ID needed by editing the blog page and checking the URL, the ID will be the only number in the URL.

  4. 5 years, 3 months ago Simo

    Hi Andrew,

    I am very sorry for the slow reply as I have been experimenting with the Mega Menu plugin and hadn’t checked emails.
    I had tried the “”visibility”” but must have done something wrong.

    I will try again and get back to you.

    Many thanks for the brilliant work you “guys” do.

    Cheers
    Simos

  5. 5 years, 3 months ago Andrew Misplon
    Hi, I Work Here

    Thanks for your support :)

  6. 5 years, 3 months ago Simo

    Hi Andrew,

    Works great now as I have re-read your links. Now formulating what I what to show on each page.

    It has generated another question on “menu locations” and adding new ones but I will raise another thread.

    Many thanks
    Simos

  7. 5 years, 3 months ago Andrew Misplon
    Hi, I Work Here

    Thanks, that’ll be great. Glad to hear you’re making progress.

  8. 5 years, 3 months ago Simo

    Hi Andrew,

    Sorry and not sure that as we talked about visibility plugin but just a quick question.
    on the menu option / visibility field I wanted to say ” !is_page(557) !is_page(218) ”

    so I can say not to show on 2 pages

    On F5 I get an error and will not load? I thought you could separate the 2 classes with a space.

    Obviously I am wrong or will it not allow this logic?

    As ever many thanks

    Simos

  9. 5 years, 3 months ago Andrew Misplon
    Hi, I Work Here

    Try: ! is_page( 557, 218 )

    https://codex.wordpress.org/Conditional_Tags#A_PAGE_Page

  10. 5 years, 3 months ago Simo

    Hi Andrew,

    Afraid what ever I tried; based on the link you sent me I either get “site experiencing issues” or it only works on the first page ID

    e.g. !is_page( array( 42, 54, 6 ) )

    I added the ‘!’ and ‘array’ as suppose to Return true when the Pages displayed is either post ID = 42, or post ID = 54, or post ID = 6.

    I think by my testing the function only works on page page i.e. the first that is true; abit bit like an ‘if’ statement
    So I can get it not to show the menu option for the page I am on but I wanted to give it only I path away from the page e.g. home, then not able to do that.
    You any further thoughts?

    As ever many thanks for your support.

    Simos

  11. 5 years, 3 months ago Andrew Misplon
    Hi, I Work Here

    I wish I knew what the problem was. Are you editing from AppearanceMenus? Here is how my test looks: https://imgur.com/a/N2mCOus. Using the conditional seen in the screenshot, I can save without error and the conditional works. Have you tried:

    ! is_page( 42, 54, 6 )

  12. 5 years, 3 months ago Simo

    Hi Andrew,
    I have just double checked and removed the above example including the “”array”” I previously mentioned.

    The option is as below which besides the spacing is the same as I have used previously and as your image.
    ! is_page( 218, 121 )

    As I said there are not a sub menus structure. The options are not shown on the first page ID but it ignores anything past that.

    I am working on the site (www.querida.co.uk) but will not touch the menus for a while if you want to look. I am testing it by not to show the FAQ (page 218) on it “own” page plus not on the contacts page.
    Page 218 is FAQ
    Page 121 is Contacts
    Hope this helps.
    Many thanks
    Simos

  13. 5 years, 3 months ago Andrew Misplon
    Hi, I Work Here

    Apologies, you’re correct, that should be an array. Let me take another look…

  14. 5 years, 3 months ago Andrew Misplon
    Hi, I Work Here

    Thanks. My example wasn’t working but now is using: ! is_page( array( 6303, 6313, 6317 ) )

    What I can see on your site is currently, the FAQ link is hidden on the FAQ page and the Contact link is hidden on the Contact page.

    For what you’ve described, ! is_page( array( 218, 121 ) ) when added to the visibility field of the FAQ menu item, that should work. I’m not sure why it isn’t.

    It might be time to just pivot to another plugin and see if that resolves the issue. I, unfortunately, don’t have another to recommend at the moment.

  15. 5 years, 3 months ago Simo

    Andrew,

    You have taught me a lot going through this and I still think the theme is great so do not worry.

    I think I mentioned before I was going to use the Mega menu plugin but had problems with that so I removed it.

    I might look as you say or just see if I can get the mega to work as I do like the horizontal option layouts.

    Again many thanks for your assistance.

    Cheers
    Simos

  16. 5 years, 3 months ago Andrew Misplon
    Hi, I Work Here

    For sure, thanks for your understanding. I’ll take a look at your recent support thread in a little bit.

    Cheers :)

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More