Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm converting a few themes to children of another theme. I want the themes to have the same name as before, and I'd like the change to be transparent to the users of my blog network.

When I replace the themes' folders with child themes in the wp-content/themes directory, the blogs in my network do not work properly until I:

  1. Access wp-admin/themes.php for each, which automatically disables the new child theme (it says that it has an error or is invalid) and sets the theme to the network default.
  2. Manually reactivate the child theme.

My blog network is pretty large. Is there a way to automate whatever is happening above so that I don't have to do it manually for every blog in the network?

share|improve this question
add comment

1 Answer 1

Figured it out. Sites have three options in the wp_options (or wp_n_options where n is the blog id) table. You can see them by running:

SELECT    * 
FROM      wp_options 
WHERE     option_name IN ('current_theme', 'stylesheet', 'template')

To fix blogs after replacing a normal theme with a child theme of the same name, run an update on the wp_options table for that blog, setting the template option to the parent theme path:

UPDATE    wp_options 
SET       option_value = 'parent-theme-path'
WHERE     option_name = 'template';
share|improve this answer
add comment

Your Answer

 
discard

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.