Themes—Child Themes

If you don’t want to develop/maintain your own Theme, then yes: choose an existing Theme, and make modifications to it via Child Theme. If, on the other hand, you are comfortable with developing/maintaining your own Theme, then either create a new Theme, or make a derivative of an existing Theme. Since, as you state, you … Read more

Conditionally load child themes

WordPress use an option to store the current active child theme. This option is named ‘stylesheet’. Using the filter ‘pre_option_{$option_name}’ you can change every option getted by WP. So, in your case you should hook the ‘pre_option_stylesheet’ filter, use some logic to retrieve current season and return the child theme you want. This workflow should … Read more

is_page_template returning false

I think your problem is how your function is constructed and not your condition as such. You should not be wrapping your function and your action in a condition like this. Page templates are selected really late in the query by the main query, and I probably think that this is way to late for … Read more

How to add new sidebar widget area to child theme?

Well, this is what worked for me. In my functions.php file I put the following code: function header_widgets_init() { register_sidebar( array( ‘name’ => ‘Header Sidebar’, ‘id’ => ‘header_sidebar’, ‘before_widget’ => ‘<aside class=”widget %2$s”>’, ‘after_widget’ => ‘</aside>’, ‘before_title’ => ‘<h2 class=”widget-title”>’, ‘after_title’ => ‘</h2>’, ) ); } add_action( ‘widgets_init’, ‘header_widgets_init’ ); …and in my header.php file … Read more

Problem with loading images from child theme CSS file with relevant path

There’s no need for the wp-content/themes path – both themes sit in the same directory, so you can just traverse up one and then back down to child theme: background-image: url(../child-theme-name/images/some-image.png); Update: Regarding your answer to “where is the CSS file stored”, you inferred that the stylesheet resides in the child theme folder – in … Read more