• tritttt

    (@tritttt)


    Hello,

    I did a child theme and I modified header.php to have my picture header in full screen.
    Now I would like to move my menu bar under the big title.
    I’m able to do that when I move this part of the header.php :

    <?php if ( has_nav_menu( 'primary' ) ) : ?>
    							<nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php _e( 'Primary Menu', 'twentysixteen' ); ?>">
    								<?php
    									wp_nav_menu( array(
    										'theme_location' => 'primary',
    										'menu_class'     => 'primary-menu',
    									 ) );
    								?>
    							</nav><!-- .main-navigation -->
    						<?php endif; ?>

    just before :

    </header><!-- .site-header -->

    it works on my computer screen but there is a problem on a phone screen : menu is always unfolded.

    Here is my site : i-magicien.com

    Do you have a php solution ? or maybe css ?

    Thanks in advance,
    Trit

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter tritttt

    (@tritttt)

    PS : If it can help, here is the modification I did :
    https://wpbeaches.com/make-a-full-width-twenty-sixteen-header/

    zvdh

    (@zvdh)

    I did it like this, the menu folds up on mobile nicely:

    <header id="masthead" class="site-header" role="banner">
    			<?php if ( get_header_image() ) : ?>
    				<?php
    					/**
    					 * Filter the default twentysixteen custom header sizes attribute.
    					 *
    					 * @since Twenty Sixteen 1.0
    					 *
    					 * @param string $custom_header_sizes sizes attribute
    					 * for Custom Header. Default '(max-width: 709px) 85vw,
    					 * (max-width: 909px) 81vw, (max-width: 1362px) 88vw, 1200px'.
    					 */
    					$custom_header_sizes = apply_filters( 'twentysixteen_custom_header_sizes', '(max-width: 709px) 85vw, (max-width: 909px) 81vw, (max-width: 1362px) 88vw, 1200px' );
    				?>
    				<div class="header-image">
    					<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
    						<img src="<?php header_image(); ?>" srcset="<?php echo esc_attr( wp_get_attachment_image_srcset( get_custom_header()->attachment_id ) ); ?>" sizes="<?php echo esc_attr( $custom_header_sizes ); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
    					</a>
    				</div><!-- .header-image -->
    			<?php endif; // End header image check. ?>
    			<div class="site-header-main">
    				<?php if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) ) : ?>
    					<button id="menu-toggle" class="menu-toggle"><?php _e( 'Menu', 'twentysixteen' ); ?></button>
    
    					<div id="site-header-menu" class="site-header-menu">
    						<?php if ( has_nav_menu( 'primary' ) ) : ?>
    							<nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Primary Menu', 'twentysixteen' ); ?>">
    								<?php
    									wp_nav_menu( array(
    										'theme_location' => 'primary',
    										'menu_class'     => 'primary-menu',
    									 ) );
    								?>
    							</nav><!-- .main-navigation -->
    						<?php endif; ?>
    					</div><!-- .site-header-menu -->
    				<?php endif; ?>
    			</div><!-- .site-header-main -->
    		</header><!-- .site-header -->

    Thread Starter tritttt

    (@tritttt)

    Hello zvdh,

    Thanks for your answer but doesn’t works for me ??

    @tritttt, have you found the solution? I have exactly the same problem ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Theme: Twenty Sixteen] Move menu bar in a modified child’ is closed to new replies.