• Resolved thunder86

    (@thunder86)


    Hey! Is there any possibility to hide the header with the social menu on some pages? I already use your tip for “Home” via Custom CSS “.home .header { display: none; }”

    Background for my question: I will implement my phpBB Forum in your Theme via W3ALL iFrame plugin. As soon as the Forum is added, it looks a bit strange with the header above the forum.

    I have the issue, that the forum shows up in the Background. That’s not normal like it should

    • This topic was modified 1 year ago by thunder86.
    • This topic was modified 1 year ago by thunder86.

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

Viewing 1 replies (of 1 total)
  • Thread Starter thunder86

    (@thunder86)

    This issue is also solved.
    One possibility to hide is the additional css code:

    header { display: none; }

    But I really like your social menu thats the reason, why I edited the header.php and removed the code, thats not important for me.

    This method works for me, because I don’t need the blog / gallery functions of the theme:

    header.php

    <head profile="https://gmpg.org/xfn/11">
    
        <meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" >
    
        <?php wp_head(); ?>
    
    </head>
    
    <body <?php body_class(); ?>>
    
        <?php 
        if ( function_exists( 'wp_body_open' ) ) {
            wp_body_open(); 
        }
        ?>
    
        <a class="skip-link button" href="#site-content"><?php _e( 'Skip to the content', 'hitchcock' ); ?></a>
    
        <div class="navigation">
    
            <div class="section-inner">
    
                <ul class="main-menu">
    
                    <?php 
                    if ( has_nav_menu( 'primary' ) ) {
    
                        $nav_args = array( 
                            'container'         => '',
                            'items_wrap'        => '%3$s',
                            'theme_location'    => 'primary',
                        );
    
                        wp_nav_menu( $nav_args );
    
                    } else {
    
                        $list_pages_args = array(
                            'container' => '',
                            'title_li'  => ''
                        );
    
                        wp_list_pages( $list_pages_args );
    
                    } 
                    ?>
    
                    <li class="header-search">
                        <?php get_search_form(); ?>
                    </li>
    
                </ul>
    
            </div><!-- .section-inner -->
    
            <button type="button" class="nav-toggle">
    
                <div class="bars">
                    <div class="bar"></div>
                    <div class="bar"></div>
                    <div class="bar"></div>
                </div>
    
            </button><!-- .nav-toggle -->
    
            <div class="mobile-navigation">
    
                <ul class="mobile-menu">
    
                    <?php 
                    if ( has_nav_menu( 'primary' ) ) {
                        wp_nav_menu( $nav_args );
                    } else {
                        wp_list_pages( $list_pages_args );
                    }
                    ?>
    
                </ul>
    
                <?php get_search_form(); ?>
    
            </div><!-- .mobile-navigation -->
    
        </div><!-- .navigation -->
    
        <?php $image_image_url = get_header_image() ? get_header_image() : get_template_directory_uri() . '/assets/images/bg.jpg'; ?>
    
        <div class="header-image" style="background-image: url( <?php echo $image_image_url; ?> );"></div>
    
        <div class="header section-inner">          
            <?php if ( has_nav_menu( 'social' ) ) : ?>
                <ul class="social-menu">        
                    <?php 
                    wp_nav_menu( array(
                        'theme_location'    =>  'social',
                        'container'         =>  '',
                        'container_class'   =>  'menu-social',
                        'items_wrap'        =>  '%3$s',
                        'menu_id'           =>  'menu-social-items',
                        'menu_class'        =>  'menu-items',
                        'depth'             =>  1,
                        'link_before'       =>  '<span class="screen-reader-text">',
                        'link_after'        =>  '</span>',
                        'fallback_cb'       =>  '',
                    ) );
                    ?>
                </ul><!-- .social-menu -->
            <?php endif; ?>
        </div><!-- .header -->
    
        <main id="site-content">
Viewing 1 replies (of 1 total)
  • The topic ‘Don′t show header everywhere’ is closed to new replies.