Child Theme vs Duplicate Theme Renamed

Child Themes are useful for users who mainly want to make style changes to their Theme, but don’t want – or know how – to maintain the underlying code. Grokking PHP/WordPress Theme Development is an entirely different thing than grokking CSS. Child Themes are also useful for users who want to implement minor functional changes … Read more

My child theme doesn’t work Error: “The parent theme is missing. Please install your parent theme”

There are three things to check: Is your parent theme complete and what is the exact spelling of the parent theme’s name in its style.css. Uppercase and lowercase are important. Is the child theme directory named parentname-child. It should be in the themes directory, not in a subdirectory of the parent theme. Does the child … Read more

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

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

How to *remove* a parent theme page template from a child theme?

Overriding that template would be much easier than getting rid of it. Just the way logic goes. I make no claim it’s efficient idea (late here), but this would get it nuked from edit screen: add_action(‘admin_head-post.php’,’remove_template’); function remove_template() { global $wp_themes; get_themes(); $templates = &$wp_themes[‘Twenty Ten’][‘Template Files’]; $template = trailingslashit( TEMPLATEPATH ).’onecolumn-page.php’; $key = array_search($template, … 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