WordPress Theme Development 4 – Footer

Normally, main index template file, index.php, consists of get_header();, posts (the loop) and get_footer();. If footer.php file exists, the code inside this file will appear in get_footer(); section.
In footer.php, you might want to show WordPress support by having the “powered by” link in this file. I also include the WordPress version, so that the reader will know what version of WordPress I am using for this web site. Lastly, don’t forget about wp_footer();. It has the same purpose as wp_head();. It will hook up with any functions that linked to wp_footer, especially from other WordPress plugin.

1
2
3
4
5
6
7
8
9
10
11
12
13
  1. <?php
  2. /**
  3. * @package WordPress
  4. * @subpackage Your_Theme
  5. */
  6. ?>
  7. <!-- begin footer -->
  8.  
  9. <p><?php bloginfo('name'); ?> <?php _e('is proudly powered by'); ?> <a title="<?php _e('WordPress, state-of-the-art semantic personal publishing platform.'); ?>" href="http://wordpress.org/">WordPress <?php bloginfo('version'); ?></a>.</p>
  10.  
  11. <?php wp_footer(); ?>
  12. </body>
  13. </html>

Related Posts

References

4 Comments

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">