Menu of shop page

Hi!
I was trying to match the Integrity Demo navigation menu for WooCommerce Shop page. On the Integrity Demo, there is a primary menu for the site, then when you click on Shop it takes you to the shop page but the menu is different.
I modified the function,php file of the child theme in the cpanel like this:

and this was the result:

This is what appears instead the website:

And this is the line 1216 on the pluggable.php mentioned there:

And I can´t access to the wordpress admin anymore!
PLEASE I need help!!

Hello There,

Thanks for writing in!

You should be using this code:

// Custom blog menu
// =============================================================================
add_filter( 'wp_nav_menu_args', 'custom_blog_menu' );

function custom_blog_menu( $args ) {
  if ( x_is_product() || x_is_product_index() || is_woocommerce || is_cart() || is_cart() ) {
    $args['theme_location'] = 'primary';
    $args['menu'] = 'Custom Menu';
  }
  return $args;
}
// =============================================================================

Before adding this code, you must make sure that you have already create a menu in Appearance > Menus with the name “Custom Menu”. If there is no menu, or the menu does not exist, it will throw an error which you might be experiencing now.

Please let us know how it goes.

Thanks!
the Custom Menu worked, but I wanted to have the previus Menu in the homepage, and the custom menu in the shop page … like the demo of integrity-1

I know they are independents WP installations but…¿it´s there a way to have the same “look” as the demo?

Thanks!

Hey @virginiabonora,

Our demos are hosted in a WordPress Multisite setup and the shop is a separate site that is why you see a different menu. There’s no option to do that in X. But, it can be done using Pro as it has a header assignment feature so you can assign a custom header for your shop page including the menu. I’d recommend you upgrade to Pro.

Though the code @RueNel gave works, please note that it is a custom code or it isn’t an official part of the theme and issues arising from the use of it and further enhancements would be outside the scope of our support. For that, you will need consult with a third party developer.

Thank you for understanding.

thanks you for your advice!

I have a silly question:

if I upgrade to Pro, would I be able to use the xtheme demos as well?
Or I have to start from zero with the design of my site?

Hi,

Yes, you can still use the xtheme demos in PRO, just make sure you have loaded the demo before upgrading to PRO.

Once you are using PRO, you can no longer load any xtheme demos, but you can now use design cloud templates

For more information kindly refr to the link below

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.