Support » Theme: Twenty Thirteen » How to remove main menu and widget area from home page?

  • Hello,

    I’d like to have a home page that looks like an ordinary website.
    I would like to leave header and a blog name name as it is but I don’t want menu and widget side appear on that page. They should be on the remaining parts of my blog though.

    Is there any simple way to do so without creating child templates etc?

    I know a “template” option when creating a new page unfortunately does not exist in Twenty Thirteen Theme.

Viewing 14 replies - 1 through 14 (of 14 total)
  • I wouldn’t recommend doing that without a child theme because you would need to go into the index or home php file and edit those areas… as soon as you update, it will all go away.

    Hi there,

    Ok than. Do you know any decent tutorial on how to properly use and create child themes?

    About as good as it gets.

    Hi again. I was just checking on you to see how the child theme quest was going.

    Hello 🙂 Thank you!

    I’m getting there. I managed to create child theme and now am trying to populate it with the elements I want to have there.


    I have activated the child theme and made the changes so it looks like the “original”. That was easy 😉

    However what I need to do to remove the menu and widget area? Please help.

    for the home page, create an index.php or home.php (whichever it is in 2013, I forget) file inside and then I would have the navigation menu hidden and the widgets hidden. Sorry, that’s not very clear, but that’s essentially what you are going for. If you edit the style.css, then it will make that happen universally and that’s not what we want to do.

    That would be index.php
    I’ve put it in the child theme catalog /wp-content/themes/twentythirteen-child

    the code for index.php is:

     * The main template file.
     * This is the most generic template file in a WordPress theme and one of the
     * two required files for a theme (the other being style.css).
     * It is used to display a page when nothing more specific matches a query.
     * For example, it puts together the home page when no home.php file exists.
     * Learn more:
     * @package WordPress
     * @subpackage Twenty_Thirteen
     * @since Twenty Thirteen 1.0
    get_header(); ?>
    	<div id="primary" class="content-area">
    		<div id="content" class="site-content" role="main">
    		<?php if ( have_posts() ) : ?>
    			<?php /* The loop */ ?>
    			<?php while ( have_posts() ) : the_post(); ?>
    				<?php get_template_part( 'content', get_post_format() ); ?>
    			<?php endwhile; ?>
    			<?php twentythirteen_paging_nav(); ?>
    		<?php else : ?>
    			<?php get_template_part( 'content', 'none' ); ?>
    		<?php endif; ?>
    		</div><!-- #content -->
    	</div><!-- #primary -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Hi Josiah,

    Could you please tell me how to have the navigation menu hidden and the widgets hidden?

    I have no idea what to do. I have tried different codes I have found in different forums but nothing works.

    Ok. Sorry, I have been out of town at conferences and could not get back to you sooner. Let’s start with nav and try eliminating:

    <?php twentythirteen_paging_nav(); ?>

    Do you mind if I have a url so that I could look at it as well?

    Thanks and I hope that helps.

    Thank you for replying.

    As I do not have much programming knowledge please be gentle :).

    Right. I have removed <?php twentythirteen_paging_nav(); ?> from index.php, uploded index.php to the location /wp-content/themes/twentythirteen-child but nothing has changed at all.

    Just to make sure… in /wp-content/themes/twentythirteen-child there are only 2 files style.css and index.php. Is that right?

    The url is

    Ha! I managed to hide the header menu 🙂

    In header.php I have wrapped the menu in conditional tag.

    <?php if ( !is_front_page() ): ?>
    <div id="navbar" class="navbar">
    				<nav id="site-navigation" class="navigation main-navigation" role="navigation">
    					<h3 class="menu-toggle"><?php _e( 'Menu', 'twentythirteen' ); ?></h3>
    					<a class="screen-reader-text skip-link" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentythirteen' ); ?>"><?php _e( 'Skip to content', 'twentythirteen' ); ?></a>
    					<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
    					<?php get_search_form(); ?>
    				</nav><!-- #site-navigation -->
    <?php endif; ?>

    I just added <?php if ( !is_front_page() ): ?> before the code above and <?php endif; ?> after.

    Now the widget area 🙂

    The same rule applies to sidebar.php 🙂

    hi! i need to remove the header nav bar in fourteen. i already bombed my blog ‘guessing’, so can you tell me where to put this code in fourteen? thanks.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘How to remove main menu and widget area from home page?’ is closed to new replies.