- This topic has 16 replies, 3 voices, and was last updated 5 years, 5 months ago by
Tom.
-
AuthorPosts
-
December 12, 2016 at 1:05 pm #253962
Dries
Hi Tom,
I have a question.
At first a site had only one top menu, now the person wants 2 different menus. They want to be seen as 1 company with 2 subitems. Interior(head) – Wood(sub1) -heating(sub2)for the menu changing i used “Menu Swapper” plugin. Now there is a problem with the mobile view on the contact menu subitems(info and contact form)
Do you have any suggestion or do you know the problem with this plugin?
Thanks!
December 12, 2016 at 1:53 pm #253990Leo
StaffCustomer SupportHi there,
Unless I misunderstand what you are after, you should be able to create a second menu/navigation without the plugin.
Go to Appearance > Menus and create a new menu with the items you want, then click the “Manage Locations” tab and assign the newly created menu to “Secondary Menu”.
Then you can customize it in Customizer > Layout > Secondary Navigation.Let me know if this is what you are looking for š
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/December 13, 2016 at 12:18 pm #254398Dries
Hi Leo,
I think you misunderstand :-). For example, I want “Primary menu 1” on Page1 and “Primary menu 2” on Page2.
So I donĀ“t want 2 menuĀ“s on one page. But two different primary menuĀ“s. With this itĀ“s possible to create 2 sites with different content and menu in one WordPress site.I hope this explanation is more clear then my first š
December 13, 2016 at 12:20 pm #254401Tom
Lead DeveloperLead DeveloperI think Menu Swapper might be your best bet – what exact issues were you having with it?
Alternatively, you could use a plugin like this and switch out individual menu items: https://en-ca.wordpress.org/plugins/if-menu/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 13, 2016 at 12:38 pm #254416Dries
Hi Tom,
I“m using now menu Swapper. The problems i see is: (normal desktop view)No Arrow on the second menu item with submenu items. When you view the site with a mobilephone, there is no dropdown of submenuitems.
Can I send you the link? For me this is a security threat by publicly saying what you use on that site.
December 13, 2016 at 12:45 pm #254422Leo
StaffCustomer SupportYou can send the link through the Contact page here: https://generatepress.com/contact/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/December 13, 2016 at 12:50 pm #254424Tom
Lead DeveloperLead DeveloperThe next version actually improves how the dropdown arrow is displayed.
If you’re comfortable with altering core files, open navigation.php and find: https://github.com/tomusborne/generatepress/blob/1.3.41/inc/navigation.php#L196-L226
And replace it with: https://github.com/tomusborne/generatepress/blob/master/inc/navigation.php#L196-L223
I’m hoping this change will fix compatibility issues with some plugins like you’re describing.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 14, 2016 at 12:08 pm #254756Dries
Hi Tom and Leo
I tried the suggested replacement, but this didn“t fix my problem.
December 14, 2016 at 12:43 pm #254770Dries
It“s something with the menu swapper I think. When I add the same menu item with dropdown like in the default layout, the problem stays.
December 14, 2016 at 7:56 pm #254893Tom
Lead DeveloperLead DeveloperHmm that’s a shame, I had high hopes for that updated code! š
You may need to settle with a plugin like this: https://en-ca.wordpress.org/plugins/if-menu/
I’ll take a look at menu swapper and see if I can spot the issue.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 15, 2016 at 4:04 am #255022Dries
Hi Tom,
I tried If-Menu. I canĀ“t accomplish the task with this plugin. You cannot say, hide if you are on this page. š
December 15, 2016 at 5:02 am #255040Dries
Hi Tom and Leo,
I tried “Page Specific Menu Items” okay, plugin works but, yeah but :).
The image gallery creates a new page, so you have to go there and set the menu for every page š ThatĀ“s not so fun. I know people, they forget this things :-).
Is there another way to do this? for example: http://wordpress.stackexchange.com/questions/150209/how-can-i-display-a-menu-on-certain-pages-only
Thanks!
December 15, 2016 at 10:53 am #255191Tom
Lead DeveloperLead DeveloperHere’s how to do it with Menu Swapper.
1. Create your new theme locations for your new menus:
add_action( 'init', 'tu_register_menus' ); function tu_register_menus() { register_nav_menu( 'first-menu', __( 'First Menu' ) ); register_nav_menu( 'second-menu', __( 'Second Menu' ) ); register_nav_menu( 'third-menu', __( 'Third Menu' ) ); }
Those will allow Menu Swapper to work in the first place.
2. Then we need to tell our arrows to work in these new theme locations:
add_filter( 'generate_menu_arrow_theme_locations','tu_gp_dropdown_arrow_locations' ); function tu_gp_dropdown_arrow_locations( $theme_locations ) { $theme_locations[] = 'first-menu'; $theme_locations[] = 'second-menu'; $theme_locations[] = 'third-menu'; return $theme_locations; }
Tested and working š
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 15, 2016 at 11:29 am #255204Dries
Hi Tom, This need to be done in the GP Navigation.php? or do I add this in a GP hook?
What with future updates?
Thanks!
December 15, 2016 at 11:29 am #255205Tom
Lead DeveloperLead DeveloperThis should help: https://generatepress.com/knowledgebase/adding-php-functions/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.