Proper way to load styles using a child theme

If you want to prevent HELLO from loading it’s own styles, this is the code to paste and adjust in your child theme’s functions.php : function hello_elementor_scripts_styles() { // Dequeue parent theme stylesheets wp_dequeue_style( ‘hello-elementor’ ); wp_deregister_style( ‘hello-elementor’ ); wp_dequeue_style( ‘hello-elementor-theme-style’ ); wp_deregister_style( ‘hello-elementor-theme-style’ ); wp_dequeue_style( ‘hello-elementor-header-footer’ ); wp_deregister_style( ‘hello-elementor-header-footer’ ); // Enqueue only child … Read more

Unload templates; disable parent Template Parts using only “theme.json”

Does anyone have any suggestions on how to disable certain template parts in a child theme using theme.json in WordPress with Gutenberg? Using only theme.json this is not possible, and runs counter to the vision for full site editing. In the future it’s possible that not only the parent theme templates might be visible, but … Read more

post_row_actions filter from parent theme not executing in child theme

There has been a major misunderstanding of child themes. Parent and child themes are a WordPress feature, not a PHP feature, and include is a PHP directive, not a WordPress function. To make the distinction and reason clearer child themes don’t inherit a parents “files” they inherit the parents “templates”. So include “inc/duplicate-posts.php”; will always … Read more

How can I use AJAX in child theme template?

It has nothing to do with child themes, the problem is here: add_action(“wp_ajax_nopriv_x_before_process”, “x_before_process”); Notice the nopriv, this is for logged out users, but it’s likely you are logged in This needs adding: add_action(“wp_ajax_x_before_process”, “x_before_process”); Note that this would not have been an issue if it was built using a more modern AJAX API such … Read more