• Hi,
    I have included a shortcode in header.php file for my website for an image slider. I also wish to retain the navigation bar at the top of the website that is in the original theme. But after including the slider shortcode in the header.php file, none of the other elements are visible. Please help!

    <?php
    /**
    * The header for our theme.
    *
    * Displays all of the <head> section and everything up till <div id=”content”>
    *
    * @package West
    */
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta charset=”<?php bloginfo( ‘charset’ ); ?>”>
    <meta name=”viewport” content=”width=device-width, initial-scale=1″>
    <link rel=”profile” href=”https://gmpg.org/xfn/11″&gt;
    <link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’ ); ?>”>

    <?php wp_head(); ?>
    <?php echo do_shortcode(“[wp1s id=’356′]”); ?></head>

    <body <?php body_class(); ?>>
    <div id=”page” class=”hfeed site”>
    <?php esc_html_e( ‘Skip to content’, ‘west’ ); ?>

    <header id=”masthead” class=”site-header <?php echo west_has_header(); ?>” role=”banner”>
    <div class=”container”>
    <div class=”site-branding col-md-4 col-sm-6 col-xs-12″>
    <?php west_branding(); ?>
    </div><!– .site-branding –>

    <nav id=”site-navigation” class=”main-navigation col-md-8″ role=”navigation”>
    <?php wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘menu_id’ => ‘primary-menu’ ) ); ?>
    </nav><!– #site-navigation –>
    <nav class=”mobile-nav”></nav>
    </div>
    </header><!– #masthead –>

    <?php if ( west_has_header() == ‘has-header’ ) : ?>
    <div class=”header-image”>
    <?php west_header_text(); ?>
    ” width=”<?php echo esc_attr( get_custom_header()->width ); ?>” alt=”<?php bloginfo(‘name’); ?>”>

    <?php $mobile = get_theme_mod(‘mobile_header’); ?>
    <?php if ( $mobile ) : ?>
    ” width=”<?php echo esc_attr( get_custom_header()->width ); ?>” alt=”<?php bloginfo(‘name’); ?>”>
    <?php else : ?>
    ” width=”1024″ alt=”<?php bloginfo(‘name’); ?>”>
    <?php endif; ?>

    </div>
    <?php else : ?>
    <div class=”header-clone”></div>
    <?php endif; ?>

    <div id=”content” class=”site-content”>
    <?php if ( !is_page_template(‘page-templates/page_composer.php’) ) : ?>
    <div class=”container”>
    <?php else : ?>
    <div class=”fullwidth”>
    <?php endif; ?>

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    You can try to select the Static option in the Customize → Header area → Menu style section, and see if it helps.

    Please feel free to ask any other questions that you might have.

    Kind Regards, Roman.

    Thread Starter joshikas

    (@joshikas)

    Hi,
    I tried selecting the Static option which does display the navigation tab but displays it under the image slider. Is there any way I can have the nav tab displayed at the top of the page while also keeping the slider?

    Thanks for your help!

    Hello,

    Is there any way I can have the nav tab displayed at the top of the page while also keeping the slider?

    You can try to select Sticky and add this CSS code in Customize → Additional CSS section:

    #masthead {
        top: 0;
    }

    Kind Regards, Roman.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shortcode hiding all other elements’ is closed to new replies.