WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Twentyeleven - how to remove the footer widget area for a specific template (3 posts)

  1. cgrray
    Member
    Posted 3 years ago #

    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.

  2. Digital Raindrops
    Member
    Posted 3 years ago #

    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

  3. cgrray
    Member
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.