How to cache bust a child theme style.css

@dalbaeb’s comment eventually lead to insightful discussions and a feasible solution. Thanks a lot! I believe the reason my child theme CSS was loaded using ‘ver=<parent-theme-version> was because I had followed the WP Codex on child themes 1:1. My functions.php contained this: add_action(‘wp_enqueue_scripts’, ‘theme_enqueue_styles’); function theme_enqueue_styles() { wp_enqueue_style(‘parent-style’, get_template_directory_uri() . ‘/style.css’); } The code I … Read more

Adding a second email address to a completed order in WooCommerce [closed]

There’s actually a filter that you can use, see abstract-wc-email.php, line 214: return apply_filters( ‘woocommerce_email_recipient_’ . $this->id, $this->recipient, $this->object ); you can put the following in your functions.php: add_filter( ‘woocommerce_email_recipient_customer_completed_order’, ‘your_email_recipient_filter_function’, 10, 2); function your_email_recipient_filter_function($recipient, $object) { $recipient = $recipient . ‘, [email protected]’; return $recipient; } the only drawback is that the recipient will see … Read more

Override parent theme translation on child theme

I think I found a solution, but before a little Premise load_theme_textdomain() and load_child_theme_textdomain() are basically equal, the only difference is the default path they use: they get the current language (using get_locale()) and add the relative .mo file to the path passed as argument; then they call load_textdomain() passing as argument both the textdomain … Read more

how do I queue my Child stylesheet/s *after* every Parent stylesheet/statement?

Just FYI, this question probably borders on too localized, as it is specific to the Oenology Theme. That said, here’s where I think you’re having a problem: Oenology enqueues two style sheets: style.css, directly in the document head (thus before wp_head() is fired) {varietal}.css, at wp_enqueue_scripts, with priority 11, in functions/dynamic-css.php: /** * Enqueue Varietal … Read more

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 to move the sidebar in TwentyFifteen to the right?

I took the following from the rtl.css and applied them via Magic Widget with additional !important keywords to an English site: body:before { right: 0 !important; left: auto !important; } .sidebar { float: right !important; margin-right: auto !important; margin-left: -100% !important; } .site-content { float: right !important; margin-right: 29.4118% !important; margin-left: auto !important; } .site-footer … 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