If you’re selling from your WordPress site using Woocommerce, you might want to add an additional nav menu which only displays on WooCommerce related pages.
This code, enables you to:
- Control which WooCommerce pages the menu displays on.
- Determine which location on the page you want the menu positioned using genesis hooks.
- Exclude or include specific pages.
Simply add the following PHP code to the end of your child themes functions file using a code editor:
How could I Remove(hide) Primary and secondary Navigation Menu From menu Page? I just want to show woo commerce menu at the top menu . Any chance you can help?
The following code assumes your menus are hooked using the genesis_after_header hook and removes both menus from the front end.
Or are you referring to removing the menus from Appearance > Menus on the admin page?
Hi,Brad I’m sorry that the way I narrate is unclear. My problem is Remove(hide) Primary and secondary Navigation Menu , When I am in the WooCommerce Pages , and just show woo commerce menu. Not in my all web sites.
You can use the code below to do that with conditional tags for woocommerce
sorry, I have another problem is that I want to add second Custom Menu To Specific WooCommerce Pages Only.
It’s mean that I will have two Custom Menu to WooCommerce Pages Only.
Sure, i have code for this. Did you search?
Yes, I did. I try to do from this ” Adding Additional Nav Menu’s in Genesis” , but it’s not show on WooCommerce Pages Only.
sorry, I’m a little fool.
Actually I figured it out. I am so dumb. I didn’t see the WooCommerce Menu drop down in the menus. Sorry about that!
Actually it isn’t working. 🙁
Here’s the code you can add to your functions file
I used the code above and it’s not working. I changed the info to match what I wanted, but on the product pages, and shop page its not work for my header_left menu. Any chance you can help?
Thanks in advance..
Please email me a copy of your theme which includes the code and i’ll fix it for you.
What theme are you using and what do you mean by header_left menu?
I am using a child theme from Hello You Designs called Hello Glam.
Currently I am on a test site, so if it makes it easier I can give you access to login and check it?
OK. Please email me FTP hostname, username and password. brad@wpsites.net