• 0
Sign in to follow this  
Followers 0

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


Question

Posted · Report post

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

3 answers to this question

  • 0

Posted · Report post

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.

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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
  • 0

Posted · Report post

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0