• Resolved chzumbrunnen

    (@chzumbrunnen)


    What a great theme!
    It looks great, also the site aside with the menu toggle on desktop is great.
    Nevertheless I’d like to have a “traditional, ordinary, boring” horizontal menu instead.

    I’m sure this could easily be done with a child theme, but I wasn’t able to replace the “get_template_part( ‘inc/parts/site-aside’ ); with “get_template_part( ‘inc/parts/site-nav’ );” and change the css accordingly.

    Why do I always want to create / change things above my knowledge?

    If anyone could guide me in the right direction, I’d appreciate it.

    Otherwise I’d probably should just use the theme as it was meant to be used ??

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

    (@anlino)

    Hi @chzumbrunnen,

    Really glad you like it!

    Yeah, I considered including an optional horizontal navigation on desktop, but decided against it in the end – balancing that many elements in the header gets a bit tricky with the horizontal space.

    There are actions that you could hook into to add one, though, like the eksell_header_toggles_start action called at the start of the header toggles container. Adding this to the functions.php file in a child theme should get you started:

    add_action( 'eksell_header_toggles_start', function() {
    	if ( has_nav_menu( 'main' ) ) {
    		echo '<ul class="horizontal-menu reset-list-style">';
    		wp_nav_menu( array(
    			'container'      		=> '',
    			'items_wrap'     		=> '%3$s',
    			'theme_location' 		=> 'main',
    		) );
    		echo '</ul>';
    	}
    } );

    With that in place, you just need to style .horizontal-menu, hide the site-aside navigation toggle on desktop, and hide the horizontal menu and show the navigation toggle at a suitable media query breakpoint for mobile devices.

    — Anders

    Thread Starter chzumbrunnen

    (@chzumbrunnen)

    Hi Anders

    Thank you so much.
    That works – kind of – but I just realise; I need to get an update on css vars and css flexbox etc..
    My plan was to add a complete navbar below the existing header.

    So “eksell_header_toggles_start” or “eksell_header_toggles_end” are not the actions I need, I think. But “eksell_header_end” might do the trick.

    I still have to find out how to start as a new full with block that sticks with the sticky header.

    • This reply was modified 3 years, 8 months ago by chzumbrunnen.
    Theme Author Anders Norén

    (@anlino)

    @chzumbrunnen Ah, I see. Yeah, in that case, the eksell_header_end action should get you what you’re looking for. Any markup added to that action will be output beneath the rest of the header, but still get included in the header when it sticks to the top of the screen.

    Anders,

    @anlino, I am a great fan of your theme Twenty Twenty. This is another lovely theme. Like @chzumbrunnen I would have also liked to have an optional horizontal navigation on desktop. I am hoping you might still consider including the option in your next update. Very impressive styling, Great job!
    Thank you

    • This reply was modified 3 years, 8 months ago by Ganesh Dahal.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘“ordinary” navigation menu instead of site aside with toggle’ is closed to new replies.