Issues enqueueing parent & child theme stylesheets with revised Codex method

QUESTION 1 Is it safe to include the assumption that parent themes properly enqueue the child theme styles, from the standpoint of child theme standards? General rule of thumb, yes. But, you should never assume. Most disasters and failures in live are due to assumptions or facts based on an assumption FACTS WITHOUT ASSUMPTIONS A … Read more

Cannot get Child Theme to load latest version of style.css

In twentyfourteen, try putting this in your child theme: function add_require_scripts_files() { wp_enqueue_style(‘twentyfourteen-style’, get_stylesheet_directory_uri().’/style.css’, array(), ‘1.0.0’, “all”); } add_action( ‘wp_enqueue_scripts’, ‘add_require_scripts_files’ ); This will replace the original stylesheet but with your own version. If you are using a different parent theme, look at the original wp_enqueue_style label for style.css and duplicate that label within your … Read more

How to modify single.php in a child theme?

your child theme can override any file in the parent theme: simply include a file of the same name in the child theme directory, and it will override the equivalent file in the parent theme directory when your site loads. with the exception: Unlike style.css, the functions.php of a child theme does not override its … Read more

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

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 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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)