WordPress.org

Support

Support » Themes and Templates » [Resolved] Twentyeleven – how to remove the footer widget area for a specific template

[Resolved] Twentyeleven – how to remove the footer widget area for a specific template

  • I’m using a child of twentyeleven and have put widgets in the three footer areas. I want to have a template that has everything but the three footer widget areas. I see there is a way to do this in the functions file but that would apply to all pages. I built a template file with this code but the widgets still show when I use it for a page.
    <?php
    /*
    Template name: No Footer Widget
    */
    ?>
    <?php get_header(); ?>
    <div id=”primary”>
    <div id=”content” role=”main”>

    <?php the_post(); ?>

    <?php get_template_part( ‘content’, ‘page’ ); ?>

    <?php comments_template( ”, true ); ?>

    </div><!– #content –>
    </div><!– #primary –>
    <?php get_footer(); ?>

    Any help will be greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Open the Twenty Eleven footer.php file and save this to your child theme with a new name example footer-custom.php

    Remark out the sidebar line in the new footer-custom.php file.
    //Remarked get_sidebar( 'footer' );

    Open the template page you created and change to.
    <?php get_footer('custom'); ?>

    This template should now load the footer-custom.php file instead of the footer.php file.

    HTH

    David

    Thanks for responding. That did the trick. I appreciate your help and hope to learn enough to help others too.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Twentyeleven – how to remove the footer widget area for a specific template’ is closed to new replies.
Skip to toolbar