WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I execute a function, which is in a plugin, only once the entire page is displayed ?

share|improve this question
Be more specific please and give the code for your function. Is it already hooked in WP? – JMau Aug 1 '13 at 10:39
up vote 1 down vote accepted

Last action you can do...

add_action('shutdown', 'before_the_end_of_world');

function before_the_end_of_world() {
   die('I will miss you, wordpress');
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.