GetSimple Support Forum

Full Version: push data to get_footer()
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have created a very simple component which will insert the html of a Nivo Slider at a specific point in a page. I need to insert code after the Jquery script has loaded at the bottom of the page so would like to know how I can add the code to the get_footer() function. Is this possible please?
use Hooks.

http://get-simple.info/wiki/plugins:hooks_filters

The footer hook is called: theme-footer

Place the following code in the themes functions.php (create if not there) This will get loaded automatically.

Code:
function myFooter(){
    echo get_component('your_componenet_name');
}

Code:
add_action( 'theme-footer', 'myFooter', array());  // if you function takes no arguments.
Thank you - perfect. :-)