Skip to content

Instantly share code, notes, and snippets.

@duellingpixels
Created March 9, 2016 01:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duellingpixels/aa1904eff1ba230d58cc to your computer and use it in GitHub Desktop.
Save duellingpixels/aa1904eff1ba230d58cc to your computer and use it in GitHub Desktop.
Add a woocommerce shop menu on a genesis themed website.
// Shop Menu
function themprefix_shop_menu () {
if ( is_woocommerce() || is_shop() || is_cart() || is_checkout() || is_account_page () || is_view_order_page() || is_product() ) {
echo '<div id="nav-header-shop" class="shop-menu-container ">';
$args = array(
'theme_location' => 'shop',
'container' => 'nav',
'container_class' => 'wrap',
'menu_class' => 'menu genesis-nav-menu members-menu',
'depth' => 1,
);
wp_nav_menu( $args );
echo '</div>';
}
}
add_theme_support( 'genesis-menus' , array ( 'primary' => 'Main Menu','shop' => 'Shop Menu' , 'secondary' => 'Footer Menu' ) );
add_action('genesis_after_header', 'themprefix_shop_menu');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment