Fires before the footer template file is loaded.


do_action( 'get_footer', (string) $name ); 

The hook allows a specific footer template file to be used in place of the default footer template file. If your file is called footer-new.php, you would specify the filename in the hook as get_footer( new ).

Parameters (1)

0. $name (string)
Name of the specific footer file to use. null for the default footer.


To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'get_footer', $name ); 
The following example is for adding a hook callback.
  1. // define the get_footer callback 
  2. function action_get_footer( $name ) { 
  3. // make action magic happen here... 
  4. }; 
  6. // add the action 
  7. add_action( 'get_footer', 'action_get_footer', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'get_footer', 'action_get_footer', 10, 1 ); 

Defined (1)

The action is defined in the following location(s).

  1. do_action( 'get_footer', $name );