Overriding function in Child theme
-
Hi,
I am trying to override a function in my parent function.php with the child function.php. I’m not sure what i’m doing wrong. (probably a lot) but it seems to be working fine in firefox but its not working in chrome. Any ideas? Here is the function I am trying to override. I want to add a link next to the widget title, which I know how to do..just not sure how to override this so it works correctly in chrome and firefox(or any other browser)/*---------------------------------------------------------------------------------- register sidebars ----------------------------------------------------------------------------------*/ if ( !function_exists( 'bk_register_sidebars' ) ) { function bk_register_sidebars() { if( function_exists('register_sidebar') ) { $sidebars = get_option("bk_sidebars_list"); if( is_array( $sidebars ) ) { foreach( $sidebars as $sidebar ) { register_sidebar(array( 'id' => $sidebar["bk-sidebar-id"], 'name' => $sidebar["bk-sidebar-name"], 'description' => __('This is one of Your custom sidebars. Add any widgets here and then assigns this sidebar to any post/page/portfolio entry in post/page/portfolio settings', 'corpora_theme'), 'before_widget' => '<li id="%1$s" class="widget clearfix %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3 class="widget-title"><span class="widget-title-wrap">', 'after_title' => '</span></h3>' )); } } } } } add_action( 'widgets_init', 'bk_register_sidebars' );
If anyone can help me out on how to override this function, i would appreciate it!! Thank you
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Overriding function in Child theme’ is closed to new replies.