Hiding Parent Theme

There is a filter called wp_prepare_themes_for_js in wp-admin/includes/theme.php in the wp_prepare_themes_for_js() function, which is called by wp-admin/themes.php to populate the theme set. That filter will allow you to remove themes from the list. Of course, you have to know the theme name. function kill_theme_wpse_188906($themes) { unset($themes[‘twentyten’]); return $themes; } add_filter(‘wp_prepare_themes_for_js’,’kill_theme_wpse_188906′);

@package & @subpackage: how to use with child themes

Rule of thumb: is your code bundled (i.e. packaged) with whatever code indicated by @package? If no, then you are using an incorrect value for @package. For the case of most Themes, this is easy: Core-bundled Themes use @package: WordPress and @subpackage Theme-Name, because they are packaged and distributed with WordPress itself All other Themes … 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

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