Avoid loading css from parent theme

In your child theme (which I am assuming you are using) functions.php file: function wpse_356175_assets() { wp_dequeue_style( ‘media-queries’ ); } add_action( ‘wp_enqueue_scripts’, ‘wpse_356175_assets’ ); Utilise wp_dequeue_style and or wp_deregister_style depending on how the stylesheet was registered/enqueued. If necessary adjust the priority of your action to fire after the registered/enqueued file from the parent theme, e.g: … Read more

Child them function.php ‘parent-style’: should I name this as parent theme name?

You can leave it as is (see Jacob Pettie’s comment) or you can change it, but the key here is to add the path to locate the parent theme’s CSS. <?php add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ ); function my_theme_enqueue_styles() {     wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );   } In your example you’re cutting it off after the … Read more

Can’t extend some core classes

You can extend it, but the class definition and any code that uses it, can’t run outside of the admin area. Wrap your class in this conditional: if ( is_admin() ) { … } If you are trying to use this on the frontend or other non-Admin areas, do not do that. Generally, classes WordPress … Read more

Widget modifications in a child theme

Widget are not part of hierarchical parent/child theme relation, so you would need to follow more generic development process: Optionally disable widget registration in parent theme (if possible to do cleanly – with hooks or otherwise). Extend (as in widget’s PHP class) or fork (copy and modify the code) widget in child theme. Register your … Read more