Jump to content

Archived

This topic is now archived and is closed to further replies.

contentedrich

Possible to use two menus (for different pages) in the Navbar?

Recommended Posts

contentedrich

Hi,

 

Just trying to work out a way of using two different menus in the Navbar (only one at a time) - any ideas? I don't want to have to set up two different sites.

 

Basically, it's for a personal site, and when a visitor comes to the homepage, I'd like them to be offered two options - a personal site (with personal interests and a blog section with filtered posts for my personal interests), or a professional site (with content more akin to a CV or resume, and a blog section with posts filtered for professional stuff). Then each version would have a different menu at the top.

 

Can anyone recommend a method of achieving the two different menus? I don't mind purchasing sections if it achieves my goal.

Thanks!

 

Rich

Share this post


Link to post
Share on other sites
Rob

Rich,

 

There are a few ways to approach this, depending on your license type. 

 

If your license is Basic (one website), then I'd set it up with the NavBar generally, but I'd create a 2nd saved menu at Dashboard > Appearance > Menus.   Because the Header in DMS is global, you'll have to use custom CSS code to hide the NavBar on those pages where you don't want it. That would be like:

.page-id-XX, .page-id-XXX .navbar {display: none;}  where XX and XXX represent the WP assigned page numbers.   When creating the custom 2nd saved menu, make sure to click Screen Options, and check the box for Custom Classes.   In each menu item, you'll want to put a unique term for that menu, like my-hobby-sb and save the menu.

 

On those pages, add Custom Menu as a sidebar widget from Dashboard > Appearance > Widgets and select the 2nd saved menu created at Appearance > Menus. 

Using a plugin called "Widget Logic" you can tell the Custom Menu widget to appear ONLY on those pages where the NavBar is hidden.   Then, with CSS, you can style the sidebar menu as such:

.my-hobby-sb {color: white;

background-color: blue;

font-size: 0.8em;

line-height: 1em;

}

.my-hobby-sb a {color: #e2e2e2;

background-color: #C00000;

}

.my-hobby-sb hover {color: yellow;

background-color: navy;

}

 

Of course, you'd use any colors of your choice, and any CSS elements are yours to add or use as pleased.

 

The next method is if you have a Pro or Developer license. 

Create a folder in your site for the secondary level of interest.  Install WP there in addition to your primary installation.  Give it a new database. Add DMS as the theme.

Set up your NavBar, as normal and include links in both the main and secondary sites to connect back and forth. That way, you'll have the exact same look and feel (you can use DMS to make an exportable child theme from the main and use in the secondary), and you'll be able to provide the means of flipping back and forth, seamlessly between the two installs. In the secondary, your saved menu is different, so your visitors see the same site with 2 unique menus and the same look and feel throughout.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
contentedrich

Hi Rob,

 

Wow - thanks for the detailed response! I thought of the second Wordpress install solution, but I don't think it's ideal - not really because of the extra Pagelines license (I have a Pro license), but because in the future I plan to switch my sites over to a Wordpress managed hosting provider, and most that I have come across seem to have a limit on the number of Wordpress installs. Plus it's another headache when it comes to updating everything.

 

I think at the moment it's probably best for me to work out a way of combing the two menus so that I only need one menu - it's only a personal site, which I'm trying to build by myself purely so that I can get myself more accustomed to working with DMS. If it's worth the extra work in the future, then I'll definitely look more into your custom CSS option (perhaps getting someone with more expertise to do it though!). I'll save your very helpful advice in Evernote for future reference!

 

Thanks again, especially for replying on a Sunday!

 

Cheers,

 

Rich

Share this post


Link to post
Share on other sites
Rob

Rich,

 

I have a major food site still using Framework.  I hope you're sitting down now.

 

I have 17 WP installations comprising the site, with the menu and links tying it all together.  Our developer thinks I'm insane.  But it works. If it weren't for the massive content the site has, I would still be on a VPS account.  What killed that was the 250,000 posts and 7Gb of images. But the WP installations didn't overtax the system. 

 

So don't worry about two.  Start worrying at 6.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

  • Similar Content

    • Liv Kundalini
      By Liv Kundalini+
      Hi -
      Pulling my hair out over here, and would love an assist!
      Site I am building, http://www.livkundalini.com/home, has a problem with the submenu items in the nav not appearing. 
      If anyone wants to see what the Nav should look like, feel free to look in the footer on the left hand side.
      Have tried disabling Pagelines and using the twentyseventeen theme, but problem persists.
      Saw this error (pasted at the bottom of this post) displaying in the inspector, and saw discussion of Jetpack potentially being a culprit. Disabled Jetpack, but the problem persists.
      Had the hosting company even flush the server-side cache, but no avail.
      Any thoughts? Please? It's the only thing keeping me from launching this site!
      Many Thanks,
      Todd
       
      WebSocket connection to 'wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data' failed: Error during WebSocket handshake: Unexpected response code: 403   O @ (index):7
    • russe-intensif
      By russe-intensif+
      Hi team,
      checking my site today, i'm surprised to see my MegaNav all in bottom of the pages, while it's in header.
      After getting to change it in couple of pages onto Template part (too time consuming !), i'm desperate and ask you for help :-)
      apprendre-le-russe-avec-ania.fr
      Thank you in advance !

    • Steve Webb
      By Steve Webb+
      I am having an issue with DMS editor not loading.  Just keeps spinning and spinning.
      Have tried several things - Logged in and out, cleared cache, deactivated all plugins, but the issue persists.
      I even had our host restore from a backup a few weeks ago, when I know it WAS working, as I edited a text box on the homepage.  The restore from backup didn't help either.
      Also, the front end of the site shows that the site is framed, or boxed now (whatever you call it), instead of full width as it was previously (last week).
      Dev console shows that there are php errors in Google maps - file is attached.
      Can someone please help?  Not sure what else I can do here...
      Thanks in advance.
      -Matt

    • tuciudadenred
      By tuciudadenred+
      Hi everyone, what happens is that the web page metrosalarmas.com has a google tags which I have not attacked where I can look to remove those tags and be able to locate the correct ones.
    • Steve Webb
      By Steve Webb+
      I am having an issue with DMS editor not loading.  Just keeps spinning and spinning.
      Have tried several things - Logged in and out, cleared cache, deactivated all plugins, but the issue persists.
      I even had our host restore from a backup a week ago, when I know it WAS working, as I edited a text box on the homepage.  The restore from backup didn't help either.
      Also, the front end of the site shows that the site is framed, or boxed now (whatever you call it), instead of full width as it was previously (last week).
      Dev console shows that there are php errors in Google maps - file is attached.
      Can someone please help?  Not sure what else I can do here...
      Thanks in advance.
      -Matt

×