• FREEZhao

    (@freezhao)


    I want to show the categories in a side menu with a full view both on the PC browsers or the mobile browsers.

    I think there are two ways can do that:

    1. Make the categories widgets show in the menu because Fukasawa has only one menu position.
    2. Add the other Menu, specifically for mobile view, so I can add a category in the mobile menu instead of the widget in the full view.

    I saw the Koji theme has the Primary Menu, Mobile Menu, and Social Menu. It can solve my problem, but I don’t know how the realize it.

    Anyone knows how to do it? Thanks so much for your help~~

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi @freezhao,

    Yeah, adding the category links to the main menu is the only way you can do it without making changes to the theme.

    To make the theme use a separate mobile menu, like Koji, you’ll need to copy the header.php file to your child theme and replace the output of the $primary_nav at line 108 with output of a new mobile menu, that you also need to register with register_nav_menu() in the functions.php file in your child theme.

    — Anders

    Thread Starter FREEZhao

    (@freezhao)

    Thank Anders,

    Could you guide me more specifically?

    I tried:
    1. add koji function.php in register_nav_menu() to Fukasawa:

    /* ---------------------------------------------------------------------------------------------
       THEME SETUP
       --------------------------------------------------------------------------------------------- */
    
    if ( ! function_exists( 'fukasawa_setup' ) ) :
    	function fukasawa_setup() {
    
    		// Add nav menu
    		register_nav_menu( 'primary-menu', __( 'Primary Menu', 'fukasawa' ) );
    		register_nav_menu( 'mobile-menu', __( 'Mobile Menu', 'fukasawa' ) );
    		register_nav_menu( 'social', __( 'Social Menu', 'fukasawa' ) );
    	}
    endif;

    2. I have no idea change $primary_nav to which party.

    Sorry for my lack of code skills but I really want to know how. Hope you can help me a little more. Thanks~!

    Theme Author Anders Norén

    (@anlino)

    Sorry @freezhao, it’s a bit too involved a change for me to write a step-by-step tutorial in the forums. You can find instructions on how to get going with child themes here: https://developer.www.ads-software.com/themes/advanced-topics/child-themes/

    Thread Starter FREEZhao

    (@freezhao)

    OK, understood, and thanks for your work. @anlino
    I have used a child theme, but the multi-menu interface is still not showing after several days of trying.
    I thought some of the codes in function.php and the head.php from Koji should be copied to Fukasawa, and I have tried many ways, unluckily, they all fall.

    Anyway, thanks for your time.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to add a Mobile Menu separately?’ is closed to new replies.