• Resolved Aliatic

    (@aliatic)


    Hello,

    I’m not very advanced with my CSS etc, and I only vaguely understand child themes etc.

    What I want is to have the site menu displayed on the post display, but not on the main blog reel (the ‘home page’). Is this possible with this theme?

    Can anyone help me do this?

Viewing 1 replies (of 1 total)
  • Theme Author Weborithm

    (@weborithm)

    You can place the navigation in a If Else statement, like this:

    <?php if ( is_single() ) : // if single show menu ?>
    <nav class="navbar navbar-inverse" role="navigation">
    <div class="container">
    <?php if ( get_theme_mod( 'compose_nav_choice' ) !== 'single' ) : // Which menu are we using? ?>
    <div id="primary-navigation" class="site-navigation primary-navigation" role="navigation">
    <button class="menu-toggle"><span><?php _e( 'Primary Menu', 'compose' ); ?></span></button>
    <a class="screen-reader-text skip-link" href="#content"><?php _e( 'Skip to content', 'compose' ); ?></a>
    <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
    </div>
    <?php else  : ?>
    <div class="navbar-header">
    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
    <span class="sr-only"><?php _e( 'Toggle navigation', 'compose' ); ?></span>
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
    </button><!-- /.navbar-toggle -->
    </div><!-- /.navbar-header -->
    <?php wp_nav_menu( array(
    'menu'              => 'primary',
    'theme_location'    => 'primary',
    'depth'             => 2,
    'container'         => 'div',
    'container_class'   => 'collapse navbar-collapse',
    'container_id'      => 'navbar-collapse',
    'menu_class'        => 'nav navbar-nav',
    'fallback_cb'       => 'wp_bootstrap_navwalker::fallback',
    'walker'            => new wp_bootstrap_navwalker())
    );
    ?>
    <?php endif; // End menu choice check ?>
    </div><!-- /.container -->
    </nav><!-- /.navbar -->
    
    <?php else : // if not single, don't show the menu ?>
    
    <?php endif; ?>

    I’d like to say that this will only the show the menu on the single posts page not on the archives, pages or any other page.

Viewing 1 replies (of 1 total)
  • The topic ‘How to get a different look to post pages?’ is closed to new replies.