Site logo

Archived topic

add mobile menu not working

3 replies · Started by sparkle on December 6, 2022

Viewing posts 1–4 of 4

i added this information to my function file:

add_action( 'init', function() {
      register_nav_menu( 'mobile-menu', __( 'Mobile Menu' ) );
  } );
  
  add_filter( 'generate_mobile_header_theme_location', function() {
      return 'mobile-menu';
  } );

and created a menu called Mobile with my items and marked the box, but just the primary nav for the desktop site remains visible....

i followed this article.... what did i do wrong? https://docs.generatepress.com/article/using-a-different-menu-on-mobile/

Hi Sparkle,

To clarify, have you turned on Mobile Header in Appearance > Customize > Layout > Header?

THAT was the missing link. now i see the right header on mobile. thank you.

You're welcome, Sparkle!

This archived topic is closed to new replies.