Is it possible to make grandchild themes?

Sort of “Yes” as a technicality, in practice No. You can specify a child parent as the parent theme, nothing stops this, and WordPress would attempt to use it. However You will run into major issues, not to mention that the core devs have explicitly stated that this is not desirable behaviour, and they will … Read more

Preserving theme settings in child theme

Because of the way these theme settings are stored as an array in the database, it can be difficult to copy them over with just copy and paste in phpmyadmin or some similar tactic. The WP CLI option command is your friend here. If you don’t use WP CLI already, check it out! Here’s how … Read more

How do themes provide support for child themes?

There is already an accepted answer, however, I am going to offer a different answer. There are things you need to do to support proper child theme functionality. First and foremost, work within the WordPress template hierarchy. I have seen themes do strange things and cook up non-standard templating structures. It isn’t even necessary to … Read more

Why does my child theme CSS get called twice?

This post is linked from this post which I have now updated with the changes in this post Thank you for bringing up this issue. I have quickly tested the scenario and the child style is actually loaded twice. When I updated the codex a while ago I made sure that the child style would … Read more

How to add code to Header.php in a child theme?

I would hook into the wp_head action. I would place this in a plugin so as to abstract it from your presentation layer. This allows for scalability and changing of themes. This also prevents any analytics collateral damage if a step is missed in migration from one theme to the next. add_action(‘wp_head’, ‘wpse_43672_wp_head’); function wpse_43672_wp_head(){ … Read more

Versioning @import of parent theme’s style.css

You don’t have to use @import. It’s best not to, actually. Using an enqueued approach is probably better all around. Here’s the relevant part of twentythirteen’s code: function twentythirteen_scripts_styles() { … // Loads our main stylesheet. wp_enqueue_style( ‘twentythirteen-style’, get_stylesheet_uri(), array(), ‘2013-07-18’ ); … } add_action( ‘wp_enqueue_scripts’, ‘twentythirteen_scripts_styles’ ); Here’s what you do in your code: … Read more