Stop Censorship Stop Censorship Ribbon  Word Press themes dev: wp_footer() | A Blog about Web Design & Development. WordPress development. Tutorials

Word Press themes dev: wp_footer() Published on January 25, 2010

Reduzir tamanho de letra Aumentar tamanho de letra Impressão optimizada do artigo Enviar por email
wp_footer() Description

wp_footer() is a less known word press hook, triggered by the wp_footer() function and is to be located at the end of you templates, a footer, as it’s own name suggests.

This is one of the most essential theme hooks,  is theme-dependent but its fairly widely supported, although not always used by theme developers.

The wp_footer() hook provides no parameters. You use this hook by having your function echo output to the browser, or by having it perform background tasks.
Your functions shouldn’t return, and shouldn’t take any parameters.

This hook is theme-dependant which means that it is up to the author of each WordPress theme to include it. It may not be available on all themes, so you should take this into account when using it.

This hook is an action which means that it primarily acts as an event trigger, instead of a content filter. This is a semantic difference, but it will help you to remember what this hook does if you use it like this:

<?php
add_action('wp_footer', 'your_function');

function your_function() {
  $content = '<p>This is inserted at the bottom</p>';
  echo $content;
}
?>

Source Article:  codex.wordpress.org/Plugin_API/Action_Reference/wp_footer

One Comment on “Word Press themes dev: wp_footer()”

  1. neel says:

    Excellent so we can wordpress hooks to add code which we want to add. like in wp_head() we can add javascripts files.

Go ahead! Leave your comment on this subject!

Fields marked with (*) are mandatory!

Spam Protection by WP-SpamFree

Resources
Goodies & Infos
Earn money with your photos

Tip: go to Shutterstock, submit your photos and make an extra income every month. - I do!

MAC

 

Categories

 

External Resources
Twitter Updates
    © 2010 - All rights reserved - WDMAC A Blog about Web Design & Development. WordPress development. Tutorials