WordPress.org

Ready to get started?Download WordPress

Forums

A different Footer for a Page (3 posts)

  1. wdowell
    Member
    Posted 6 years ago #

    I've spent quite some time searching, with no solution, so please forgive me if this has already been answered...

    Essentially, I have a Page (as in the 'static' About me type pages) and I would like to have a MODIFIED Footer on one than for the rest of my wordpress site. I've tried making a duplicate Footer.php file (named very imaginatively, Footer2.php), and renaming the link of <?php get_footer(); ?>to <?php get_footer2(); ?>in the Page concerned, but it doesn't seem to work.

    I can only presume there is a way to do this .. I'd be extreamly greatful for any assistance! Thanks in advance, William

  2. Joel
    Member
    Posted 6 years ago #

    Use the http://bloggingexperiment.com/archives/add-widgets-wordpress-themes.php">php include function:

    In short, within the template page you would like your custom footer to appear, you will include:
    <?php include ('footer2.php'); ?>

    and you will eliminate the existing:
    <?php get_footer(); ?>

  3. lelandf
    Member
    Posted 6 years ago #

    Another way of doing it would be with a conditional tag.

    <?php if (is_page('your-page-slug')) { include (TEMPLATEPATH . '/footer2.php'); } else { get_footer(); } ?>

    Let us know if that works.

Topic Closed

This topic has been closed to new replies.

About this Topic