i am working with multisite.

each time i activate some theme in new blog, i need to go to customizer and click the "save" to save all the values to db so i could use the with get_theme_mod

if there is a way to save me time by save customizer default values to db on theme activation?

  • no one knows how to save default values to DB. – need-help Mar 22 '15 at 15:12
  • 1
    don't save default values to the db, use the second argument of get_theme_mod to pass a default value in the case that the theme mod doesn't exist. – Milo Mar 22 '15 at 17:19
  • Hi @Milo Thanks for the suggestion. i did not think on this. can you give me example hoe to get default value true get_theme_mod – need-help Mar 24 '15 at 9:24
  • simple use wordpress.stackexchange.com/questions/248570/… @need-help – prosti Dec 7 '16 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.