• Resolved Que42

    (@que42)


    I thought I was done but I have one more problem. (sigh) Is is at all possible, or let me rephrase that, I know anything is possible but how hard would it be to get rid of my top menu bar on my full-width.php but retain the header image and keep the menu bar on all my other pages?

    Or If that is not easy is there a way to nuke the header all together on the full wigth page. I could insert the header image with html if need be. I tried removing the call to header function om full-width.php but I guess it does more than just bring up the header because the page didn’t load at all.

    Using twenty twelve and newest version of WP

Viewing 15 replies - 1 through 15 (of 16 total)
  • Are you using a child theme?

    Thread Starter Que42

    (@que42)

    yes, made a twentytwelve-child but misread the instructions and threw in the entire css file and stated editing massively so to late now. I’ll be hating life come upgrade time lol.

    Thread Starter Que42

    (@que42)

    Just looked and in the child theme I have
    footer.php
    sidebar.php
    single.php
    in addition to the style.css. But I haven’t done anything with the footer as of yet.

    Thread Starter Que42

    (@que42)

    Esmi. I’m assuming you went offline last night. I’m hoping you are around today and have the time to help me out.

    Is this full-width.php template file in your child theme?

    Thread Starter Que42

    (@que42)

    no, but I can make it so and thank you for responding.

    Thread Starter Que42

    (@que42)

    Oooo should I place it in a template subfolder like it came in the zip?

    Once you have done that, drop a copy of that file into the pastebin and post the url here. Someone should be able to help you to remove the menu call in that template file.

    Place the full-width.php file in the child theme’s folder.

    Thread Starter Que42

    (@que42)

    Done, And thank you Esmi for you help.

    https://pastebin.com/czTDSUtG

    That code should work just fine. There’s no call to <?php get_sidebar();> in it (it would normally be just before <?php get_footer(); ?>).

    However, you may still have to add some new CSS to your child theme to get the main content area to now stretch across the page to take up the space left by the now-missing sidebar. Try something like:

    .site-content {
        float: none;
        width: 100%;
    }
    Thread Starter Que42

    (@que42)

    I’m sorry Esmi but I don’t understand. The code I posted will bring in the header with the menu. As for the sidebar this is the template that has none. I checked the original download and it is the same.

    Thread Starter Que42

    (@que42)

    Oooooo I see. I think you misunderstood me Esmi and thought I wanted to remove the sidebar which isn’t the case as it’s already gone on this template. I want to remove the menu bar for this template only.

    Sorry! My bad! In order to omit the top nav menu, you need to create a custom version of header.php in your child theme called something like header-nonav.php. On this new template file, you’ll need to remove:

    <nav id="site-navigation" class="main-navigation" role="navigation">
    			<h3 class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></h3>
    			<a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
    			<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
    		</nav><!-- #site-navigation -->

    Then go back into full-width.php and change get_header(); to get_header('nonav');.

    Thread Starter Que42

    (@que42)

    Esmi You’re not bad, You’re GREAT!!!! Thank you very much for taking the time to help me.

    For all the other nobs like me it won’t work unless you put the full-width.php in a subfolder called page-templates just like it is on the regular twentytwelve theme. Or at least it wouldn’t work for me. Problem is you won’t be able to edit it from WP like you can the other files. So do your editing and then upload it.

    Thanks again to Esmi

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Removing the menu bar on full wight page’ is closed to new replies.