Jump to content

Archived

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

nuovait

Menu Swapper plugin does not work with Primary menu

Recommended Posts

nuovait+    0
nuovait

I installed menu swapper plugin to display different menus on different pages.

However it does not work for the primary menu. It does work for the simplenav menu though.

After some digging into the code I found that the menu call in the navbar section is missing the 'theme_location' parameter that is used by the plugin.

 

Looks like it's hardcoded somewhere to use the primary-menu navigation.

 

Can you fix this issue?

 

Navbar section code

if ( is_array( wp_get_nav_menu_items( $menu ) ) || has_nav_menu( 'primary' ) ) {
					wp_nav_menu( 
						array(
							'menu_class'		=> 'font-sub navline pldrop ' . $align_class, 
							'menu'				=> $menu,
							'container'			=> null, 
							'container_class'	=> '', 
							'depth'				=> 3, 
							'fallback_cb'		=> ''
						) 
					);

Simplenav section code

		wp_nav_menu( array('menu_class'  => 'inline-list simplenav font-sub', 'theme_location'=>'simple_nav','depth' => 1,  'fallback_cb'=>'simple_nav_fallback') );

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi,

 

I also just this moment tried the Menu Swapper and found it didn't work. I will report this to our tracker.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
nuovait+    0
nuovait

any update on this issue?

 

thanks.

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

There is currently no update as of this moment. However, this isn't really an issue, its just that the plugin and DMS are not compatible with the NavBar.

It has been reported to our tracker as an enhancement.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
ochong88    23
ochong88

how can i display different menus on different pages with out this plug-in?

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

ochong88

Presently no there isn't a way. However, in 1.2 update you will be able to achieve this with custom fields.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
ochong88    23
ochong88

Thank you Danny. I am going to try Uber Menu. And looking forward to the update. 

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

nuovait - Unfortunately, I don't think your request is going to work in the near future anyway. As it will likely require a rewrite of the NavBar and Fixed Navbar. 

However, you will be able to achieve something similar with custom fields in 1.2.

 

ochong88 No problem.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • khat
      By khat+
      I think I may have installed pagelines pro incorrectly, and then used features incorrectly. I installed first platforms framework theme and then the child, thinking I could do setup for child later. I tried to set up a background image, and tried custom css feature in pagelines dashboard. I had mistakes in my css, and just thought that if I deleted the info in the css custom feature in pagelines dashboard that the new information would overwrite the old info. The background image didn't respond at all, probably because I didn't have the child directory renamed. I then tried to use the LSS plugin to create css and added more css, possibly, somewhere -sigh-. I never did change the background image and get it placed properly. I used a workaround and in nested containers I placed a background image which worked well enough, so I moved on to try to create my nav bar/ menu bar. When I go to the Menus panel, there is NO area where I can place a menu on a page. I have read and reread and re- re- reread the instructions for placing a menu. I've used the pagelines editor to place a menu, however only HOME shows up. I've been at this for many hours. I've since uninstalled all of my pagelines items and reinstalled, thinking that it would restore all my changes to default, but no, it is still all there, with all my unresolved issues. I am completely at a loss as to what to do next.
    • Jarek
      By Jarek+
      How to make the Impulse menu sticky?
      Here is a site that seems like it is doing just that: http://www.manhattanperiodontist.com/
      Here is the site I am working on: http://boeriu.digitalvector.com/ 
      I have no problem showing the menu at the bottom, but when scrolling up it does not stick.  I tried to add Nav Pro menu but when I do that, it just shows on top and no matter what I try is not working as I want it to.
      Any suggestions?
    • Dave
      By Dave+
      1) Toggle menu on mobile devices does not work properly, combination Chrome 56.0.2924.87 with Android 6.0.1

      2) Mobile / Default Menu > Set the primary/default navigation for your site. This will be used in the pop out mobile menu and as the default in navigation sections. Does not work.
    • David
      By David+
      We are building a long-page scrolling site with Pagelines 5. Our menu is made with # links that go to a container's unique ID, e.g. container_ux7al6g
      This works, but it doesn't look great in the menu. Is it possible to assign a 'nice' # link, e.g. /#solutions ? 
      We used to do this in the DMS2 platform through a workaround, but that doesn't seem to be possible now. 
      Any suggestions? 
    • yemoonyah
      By yemoonyah+
      I just installed and added the Flipper section to my home page and it makes my navigation/menu bar items disappear.
      They do show up again when scrolling down and everything seems normal on the other pages.
      http://yemoonyah.com
      Thanks.
       
×