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

I have a widget which can be updated every time with few values and admin update it on daily basis now how to get its last update time.

share|improve this question
up vote 1 down vote accepted

When you save the widget, you can save a field (which won't be setable in the admin interface) which stores the current time and then use that when you go to do the widget output.

share|improve this answer
Thanks @m0r7if3r – Huzoor Bux Mar 9 '12 at 7:56
I have added manual query on last updated time of table and fix this issue ... $recentposts = $wpdb->get_results("SELECT DATE_FORMAT(CONVERT_TZ(UPDATE_TIME,'-06:00','+5:00'),'%b %d, %Y %l:%i %p') as UPDATETIMEWidget FROM information_schema.tables WHERE TABLE_NAME = 'wp_options'"); echo $recentposts[0]->UPDATETIMEWidget; – Huzoor Bux Mar 9 '12 at 9:43

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.