How to properly dequeue scripts and styles in child theme?

I made a parent theme and a child theme in one of my project. I enqueued CSS and JavaScripts in my parent theme like below: function project_necessary_scripts() { //Stylesheets wp_register_style( ‘bootstrap-css’, get_template_directory_uri() .’/css/bootstrap.min.css’ ); wp_register_style( ‘bootstrap-map’, get_template_directory_uri() .’/css/bootstrap.css.map’ ); wp_register_style( ‘project-css’, get_stylesheet_uri() ); wp_enqueue_style( ‘bootstrap-css’ ); wp_enqueue_style( ‘bootstrap-map’ ); wp_enqueue_style( ‘project-css’ ); //JavaScripts wp_register_script( ‘modernizr-js’, … Read more

How do I make my child theme re-apply the settings that were customised when its parent was active?

Scenario Pick 2015 theme. Customize various settings, such as background picture, header picture, site name and tagline. But don’t touch the contents of any of the theme’s files. Use Codex’ Child Themes to create a bare minimum child theme of the 2015 theme. Activate the new child theme. Oops? The site with this bare minimum … Read more

WooCommerce: change display order of product short description and price [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for WordPress Development Stack Exchange. Closed 6 years ago. Improve this question I’d like to move the price “$4.99–$24.99” below the product short description “Seriously. Drink a cup of this…” NSFW Image Below … Read more

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

I’m using the TwentyTen theme to create a child theme, but I can’t seem to get rid of the ‘One column, no sidebar’ page template that is in the TwentyTen parent theme. I thought just copying it over and deleting the contents would do the trick, but it seems not. Does anyone know how to … Read more

Remove parent theme action in child

I’m creating a child theme from Storefront. Now I want to remove these action in child theme add_action( ‘woocommerce_before_shop_loop’,’storefront_sorting_wrapper’,9 ); by this function: add_action( ‘after_setup_theme’,’remove_action’, 100 ); function remove_action() { remove_action( ‘init’, ‘woocommerce_before_shop_loop’); } but it doesn’t work! 2 For removing an action hook you should use the same action name, callback name and the … Read more

remove_action on after_setup_theme not working from child theme

I am trying to remove a theme action for an elegant-themes theme using a child theme.. This works when I remove action after add_action code anywhere in the parent theme functions.php. However, it does not work when I add it from child theme functions.php. remove_action (‘after_setup_theme’, ‘et_pb_setup_theme’ , 10); Remove action has same priority 10 … Read more

Why does my child theme CSS get called twice?

I created a child theme according the WP docs and added the requisite function <?php add_action( ‘wp_enqueue_scripts’, ‘enqueue_child_theme_styles’, PHP_INT_MAX); function enqueue_child_theme_styles() { wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ ); wp_enqueue_style( ‘child-style’, get_stylesheet_uri(), array(‘parent-style’) ); } Somehow I end up with 2 references to my child theme stylesheet: <link rel=”stylesheet” id=’twentythirteen-style-css’ href=”http://DOMAIN.COM/wp-content/themes/twentythirteen-child/style.css?ver=2013-07-18″ type=”text/css” media=”all” /> <link rel=”stylesheet” id=’child-style-css’ href=”http://DOMAIN.COM/wp-content/themes/twentythirteen-child/style.css?ver=4.0″ … Read more