- This topic has 5 replies, 2 voices, and was last updated 4 years, 1 month ago by
Tom.
-
AuthorPosts
-
February 19, 2019 at 11:02 am #814833
Lynn
First of all, thank you in advance. I have used GP Premium with many sites and normally find any and every answer I need on your forum. This one has me stumped and I am seeking expertise.
I have a site with 2 menus one in the top bar including social links, contact us and the main menu including about, blog and services. Each service is a drop down under the heading services. On the main page of each service I would like an additional menu for that particular group of pages. The main menu in the header and the top bar menu would remain but a sub menu would display horizontally under the page header with a few more pages, like portfolio, pricing, details. (or something like that.) the best way for me to describe to to show another site that has what I want to do. https://kenco.com/products/brush-grapple/
My question is – is there a fairly easy way to do it with an extension or plugin? I am trying to avoid coding a separate whole menu. While I do know some CSS, I am not quick with it.
Thanks so much!
GeneratePress 2.2.2February 19, 2019 at 5:35 pm #815023Tom
Lead DeveloperLead DeveloperHi there,
Are you talking about the “Compare models” navigation?
If so, something like that would be pretty complex to create, unfortunately. Would this menu change from product to product, or is just one additional menu that stays the same?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 19, 2019 at 6:29 pm #815062Lynn
Thanks for the reply.
Yes I am talking about the compare models / photos videos / request quote (that would be the menu) If you look deeper into that site each product has a submenu similar that links to specifics about that particular product. What I would be looking for is a separate sub menu for separate service pages. The styling would be the same for each, just the links would change.
Hope this makes sense.
February 20, 2019 at 9:48 am #815780Tom
Lead DeveloperLead DeveloperSomething like this would be pretty complex to achieve, unfortunately. You’d need a method to deliver the custom links into the menus conditionally.
A potential option would be to use the Secondary Navigation option, and then use this plugin to conditionally change the links: https://wordpress.org/plugins/conditional-menus/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 23, 2019 at 5:49 am #818630Lynn
Hi Tom, Just wanted to update you that I was able achieve what I needed!!
First off – I am working with a child theme.
added the following to functions.php
function wpb_custom_new_menu() {
register_nav_menu(‘nameof-custom-menu’,__( ‘Custom Menu’ ));
}
add_action( ‘init’, ‘wpb_custom_new_menu’ );Then created a new template file for the specific pages I want this to occur and then added this code in the location where I wanted it to appear
<?php
wp_nav_menu( array(
‘theme_location’ => ‘nameof-custom-menu’,
‘container_class’ => ‘custom-menu-class’ ) );
?>I used the plugin ‘max mega menu’ for styling. Way easier than writing all the css for me.
Thanks for a great theme.
February 23, 2019 at 9:02 am #818922Tom
Lead DeveloperLead DeveloperAwesome! Great solution 🙂
Thanks for sharing it!
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.