GetSimple Support Forum
QUESTION push data to get_footer() - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Scripts & Components (http://get-simple.info/forums/forumdisplay.php?fid=11)
+--- Thread: QUESTION push data to get_footer() (/showthread.php?tid=9982)



push data to get_footer() - tibbz - 2017-09-11

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?


RE: push data to get_footer() - n00dles101 - 2017-09-12

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.



RE: push data to get_footer() - tibbz - 2017-09-13

Thank you - perfect. :-)