widgets_init actions not fired from functions.php’s child theme

In your child theme’s ‘functions.php’ file, you need to use the remove_action( ‘widgets_init’, ‘$name’ ); script. For instance, in your twentytwelve-child theme’s functions.php file, use: remove_action( ‘widgets_init’, ‘twentytwelve_widgets_init’ ); //necessary to replace parent theme’s code and then hook your new widget in your child theme’s function add_action( ‘widgets_init’, ‘new_twentytwelve_widgets_init’, 0 );

How do child themes work?

Child themes are different then parent themes (in this case Twenty Fifteen is the parent theme). Child themes are just copies of your parent themes files. Then you modify those child theme files and they override your parent theme. The advantage of doing this over creating a new theme is that you can update the … Read more

custom post type does not working when adding in child theme function

try to check you functions. That function might exist somewhere in your code. if you cant find it, then try to remove the if statement and just add your function directly like this function testimonial() { register_post_type( ‘testimonial’, array( ‘labels’ => array( ‘name’ => ‘Testimonial’, ‘singular_name’ => ‘Testimonial’, ‘add_new’ => ‘Add New’, ‘add_new_item’ => ‘Add … Read more