Tag Info

Hot answers tagged

2

My guess would be that you are remove the action before it is actually being added in the parent theme. The parent's theme functions.php file gets loaded after the child one so it looks like your removing something that is not there yet. The 3rd parameter in remove_action() is the priority. Try playing around with that number - the default is 10 - to see ...


1

You simply need to run your code on a higher priority than what the parent theme is, the default on add_action function is 10 so you can use: function s157343_unregister_widgets() { unregister_widget( 'Chocolat_Widget_New_Entrys' ); } add_action( 'widgets_init', 's157343_unregister_widgets', 20 ); This will unregister that widget. Of course, you can ...


1

Constants can not be redefined that easily. http://stackoverflow.com/questions/8465155/redefine-constants-in-php So, the constants from child themes will be used instead of parents one. Though, there will be a warning, but that shouldn't create any problem if you disable warning. You should add constants like this if you don't want any warning: if ( ...


1

First, you are confused. It is not the same "override a function" that remove a filter. Assuming that you want to remove a filter, I think that your code should be: function remove_html5_insert_image(){ remove_filter('image_send_to_editor','html5_insert_image', 10); } add_action('after_setup_theme','remove_html5_insert_image'); Note that the filter ...


1

The child theme's main stylesheet (style.css) is loaded after the parent theme's main stylesheet (style.css), that is why you see the changes in the child theme overriding the parent theme style. As for the rest of your stylesheets, it is all about priority. What this means is, the custom stylesheet in your parent theme is loaded after your child theme's ...


1

This seems to test properly for me. function register_home_sidebar() { /* Register the new sidebar. */ register_sidebar( array( 'id' => 'home-sidebar', 'name' => __('Home Sidebar'), 'description' => __( 'This sidebar will display only on the homepage.'), 'before_widget' => '<aside id="%1$s" class="widget ...


1

Ok, finally the support team answered my question, and if even if there's not a real solution, suggested a workaround. Since the answer is buried deep in the vendor user forum - link here - I'm sharing the solution here, just in case someone has the same problem with this or another theme. Basically it's a bug in the parent theme (Toolset Bootstrap), that ...



Only top voted, non community-wiki answers of a minimum length are eligible