WordPress.org

Ready to get started?Download WordPress

Forums

Changing the menu in function of the site (5 posts)

  1. brigitte11
    Member
    Posted 4 years ago #

    I am building the website for the company.
    The website has to be structured in 4 sites. These 4 websites will all have their own navigation menu in the same theme.

    In WordPress 3.0 I saw the possibility to make several menus, which I did. But how can I tell that page A has to have Menu 1, page B menu 2, etc.

    Maybe it is possible to make 4 different templates calling a specific header (header1 with menu 1, header 2 with menu 2 ...) but I don't know how to adapt the code.

  2. Do you need the PAGES to have separate menus or the SITES? The sites is easy, just use the built in menu feature of 3.0 and customize per site.

    Per page is complicated only in that you can't just whip out a function to say 'On page A, use Menu 1' in quite the same way (because if Page A exists on Sites 1 and 3, then BOTH would get Menu 1 ... I think).

    You COULD use shortcodes though - http://www.cozmoslabs.com/2010/06/28/wp_nav_menu-shortcode/

  3. brigitte11
    Member
    Posted 4 years ago #

    I made the different sites but
    - I didn't succeed to change the menu on the other sites. It is automaticcaly the first menu that WP takes into consideration.
    - when I make a new page, it goes automatically in the main site. Where can I define that one page goes to a specific site?

  4. brigitte11
    Member
    Posted 4 years ago #

    Ipstenu,

    I just tried your shortcodes which works very well :-)
    But I would like to have the menu in the header of my page.
    How can I place the function [listmenu menu=Sitemap] in the header ?

  5. - when I make a new page, it goes automatically in the main site. Where can I define that one page goes to a specific site?

    You have to make the page on the site. So go to domain.com/site/wp-admin and make the page there.

    That's also where you'll make the menus per site. Each site has it's own Admin backend, you see.

    How can I place the function [listmenu menu=Sitemap] in the header ?

    Again, is this a PER SITE thing or a PER PAGE thing? The answer changes.

    If it's Per-Site, just go to that site's admin side and make the menu.

    If it's per page, you can put the short code in the page, but if you want it in the header, you might need to craft a function that checks 'if site Foo AND page Bar, then...'

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.