Extra Footer only for the Homepage?

resolved (5 posts) (2 voices)

  1. lukeman22
    Member

    Hi,

    I would like to have a footer just for the Homepage, because I want to keep the Homepage as clean as possible. It would be really nice if there was a way to create an extra footer for this case. The footer doesn't need to appear in the WP settings, I could maintain the content right in den file.. but I don't know how to create such a footer and link it to the Homepage (index-file).

    Could anyone help me?

    Greetings from Germany!

    Posted 4 years ago #
  2. Elliott
    Support

    Hello lukeman22,

    Open up /wp-content/themes/[your_theme]/footer.php and around lines 19 - 28 you should see the footer,

    ?><div id="footer">
    	<div class="multibg">
    		<div class="multibg"></div>
    	</div>
    	<div id="footer_inner">
    		<?php mysite_footer();
    
    	?></div><!-- #footer_inner -->
    	<?php mysite_after_footer_inner();
    ?></div><!-- #footer -->

    You could try using the is_home() conditional check, http://codex.wordpress.org/Function_Reference/is_home, to add your code to the homepage.

    Posted 4 years ago #
  3. lukeman22
    Member

    Hello Elliott,

    thank you for help.
    I'm not that big of a php-guy ;-)
    Could it be possible, to just add another footer.php (maybe footer_home.php) and reference to it in the home.php with something like this <?php get_footer_home(); ?>
    I already tried this and sure enough it doesn't work, because this 'function' isn't defined.. right? But could this be another possible solution? Thanks!

    Posted 4 years ago #
  4. Elliott
    Support

    No, that wouldn't be possible. You'll need to edit the footer.php file.

    Posted 4 years ago #
  5. lukeman22
    Member

    Thank you!
    I searched a little bit and found a handy tip that works really well. With a second footer-home.php and the following code (for home.php)

    <?php if ( is_home() ) : get_footer( 'home' ); else : get_footer(); endif; ?>

    everything is fine. I made only a very little changes in the footer-home.php and it works perfectly! This should work for other users as well so I paste it here.

    Posted 4 years ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme