WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 do I make a WP page (w/ dynamic content) auto-refresh every minute?

With PHP, I'd use a "Refresh:" header, and in HTML I could use a HTTP-EQUIV tag or something.

However, WP generates headers itself, and I can't tweak anything until the body, no?

I searched in vain for a plug-in that does this.

share|improve this question
Why not use javascript? – Wyck May 21 '11 at 3:24

you can add <meta http-equiv="refresh" content="60"> to your header.php file in wordpress theme.

EDIT: I removed the last bit of code and just made a plugin with read me file and the functions you would want.

You can download the plugin from here WP Auto Refresh Plugin and install it from the beck-end. Note i did not create a graphical UI so the plugin will need to be modified from the file it self. Maybe ill develop a basic UI but for now i need to work on some other higher priority projects. the plugin can be found in your /wp-content/plugins directory under auto_refresh.

share|improve this answer
just a side note i did try the plugin code and it works. Nice thing with this is it can be a plugin instead of a theme edit so no worries on updates and if you want to disable just disable it – xLRDxREVENGEx May 21 '11 at 4:28
OK, I did this and it worked (despite spewing out an error when I activated the plugin). How do I limit it to specific pages? I don't need them all refreshing every minute. Can I create "header-slug" pages, or does that only work for page-slug and post-slug? – barrycarter May 21 '11 at 11:44
are you wanting certain pages or certain posts? – xLRDxREVENGEx May 21 '11 at 14:42
Can you tell me what error it spit out at yeah – xLRDxREVENGEx May 21 '11 at 16:26
I updated my answer with a link to a plugin that should do what your looking for – xLRDxREVENGEx May 21 '11 at 16:53

protected by Community Sep 2 '11 at 15:34

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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