Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Elaborate on get_footer();
#1
I can't seem to understand what get_footer() does. I'm trying to hook a function of a plugin to the footer, but I'm not having luck.
Can someone elaborate on how to implement correctly a footer in a template.

I'm new to GetSimple and I'm enyoing it so far.. I just need to understand the dynamics a little bit better. Thanks for the help in advance.
- Julian

My GetSimple Plugins: Simple Image Gallery | TweetMeme reTweet Button
Reply
#2
Hi Julian,

To hook the function into the template (your website frontend), you would actually want to use:

theme-footer.

Demonstrated here:
add_action('theme-footer','FUNTIONNAME',array());
Nothing is too difficult... anything is possible.
'But you tried, and you failed.. the important thing? never try'
Reply
#3
otherwise, if you wanted it to be in anywhere (frontend, backend) you'd want to use:

footer

add_action('footer', 'FUNCTION',array());
Nothing is too difficult... anything is possible.
'But you tried, and you failed.. the important thing? never try'
Reply
#4
Great. Thanks for the quick response.. I tried what you posted and it worked perfectly. Smile
- Julian

My GetSimple Plugins: Simple Image Gallery | TweetMeme reTweet Button
Reply
#5
crashfellow Wrote:otherwise, if you wanted it to be in anywhere (frontend, backend) you'd want to use:

footer

add_action('footer', 'FUNCTION',array());

footer is only for the backend's footer. Sorry, too much time squashing bugs - not enough time to create the necessary documentation. Once 2.01 is released and its stable, I will dedicate myself to more thorough docs.
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#6
Ohh well that's even better!

So you have one code for front, and one for backend Smile great success! Smile Tongue

But no, that is good. Makes it easier.
Nothing is too difficult... anything is possible.
'But you tried, and you failed.. the important thing? never try'
Reply
#7
i'm a bit doubtful but i think that add_action has the default value null as third parameter, means:
Code:
add_action(.., .., .. = null)

if someone forgets the thrid parameter or believes, that null is ok, he fails. my proposal: replace the interface with
Code:
add_action(.., .., .. = array())

comments?
Reply




Users browsing this thread: 1 Guest(s)