WordPress child theme override a parent theme include

后端 未结 1 1406
忘掉有多难
忘掉有多难 2021-01-26 16:29

I\'m creating a WordPress child theme and need to overwrite certain widget templates. I\'m trying to use this method to override the parent theme call: The Right Way to Override

相关标签:
1条回答
  • 2021-01-26 17:21

    Try this

    add_action( 'init', 'remove_hickory_widgets' );
    
    function remove_hickory_widgets() {
        remove_action('widgets_init', 'hickory_homepage_load_widget' );
        add_action( 'init', 'custom_widgets' );
    }
    
    function custom_widgets(){
        // your widget code here
    }
    
    0 讨论(0)
提交回复
热议问题