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

I want to add & reset default value for my theme options while activate and deactivate a theme

More clearly something like this

if(theme active)
  // add new option to the theme and register default setting for one time only

if(theme deactivate)
  // reset current option and delete default setting  for one time only


How know is theme active or not? What a function or hook for this one. Let me know

share|improve this question
possible duplicate : wordpress.stackexchange.com/questions/6248/theme-activate-hook – Bainternet Feb 3 '11 at 17:27
up vote 1 down vote accepted

Hi @haha:

I think what you are looking for was answered here:

share|improve this answer
Thanks MikeSchinkel – haha Feb 3 '11 at 17:28

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.