Posts: 19
Threads: 5
Joined: Feb 2016
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?
Posts: 1,108
Threads: 70
Joined: Aug 2009
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.
Posts: 19
Threads: 5
Joined: Feb 2016