WordPress PHP custom theme functions.php hook

In your theme (wp-content/themes/YourNewTheme) create or find functions.php

and start making whatever you need.  It’s a nice clean place to put things without hacking away at your code,

dynamically inserting with JS, or whatever other measure you’ve either employed in the past, or are considering now…

for example,

//My own footer hook
function my_footer() {

//code to execute

?><div class=”bigText”>blah blah blah</div><?



then, wherever you like, call your new function, example, replace all <? wp_footer(); ?> calls with, you guested it, <? my_footer(); ?>

thanks to: http://www.raymondselda.com/understanding-action-hooks-in-wordpress/

Don’t forget to include the following in your new custom theme functions.php file if you want the dynamic custom drag widget sidebar!:

if ( function_exists(‘register_sidebar’) )

reference: http://codex.wordpress.org/Widgetizing_Themes

Comments are closed.