Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION push data to get_footer()
#1
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?
Reply
#2
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.
My Github Repos: Github
Website: DigiMute
Reply
#3
Thank you - perfect. :-)
Reply




Users browsing this thread: 1 Guest(s)
Free HDTV Channels Residential Solar Panels