Title: flounder_widgets_init()
Last modified: August 21, 2016

---

# flounder_widgets_init()

 *  Resolved [Alexander Goncharov](https://wordpress.org/support/users/luzlol/)
 * (@luzlol)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/flounder_widgets_init/)
 * Hi guys!
 * First of all, thanks for a great theme! I just wanted to ask you to include conditional
   statement into theme functions.php around flounder_widgets_init() function. Otherwise
   I’m not able to overwrite it in my child theme.
 * Thanks =)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/flounder_widgets_init/#post-4357428)
 * the ‘flounder_widgets_init()’ is added via `add_action( 'widgets_init', 'flounder_widgets_init');`
 * generally, remove that action first in your child theme, and add your own ‘init’
   function.
 * [http://codex.wordpress.org/Function_Reference/remove_action](http://codex.wordpress.org/Function_Reference/remove_action)
 *  Thread Starter [Alexander Goncharov](https://wordpress.org/support/users/luzlol/)
 * (@luzlol)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/flounder_widgets_init/#post-4357442)
 * child theme loads before the parent theme
 * one does not simply remove not added action hook =)
 *  [ronangelo](https://wordpress.org/support/users/ronangelo/)
 * (@ronangelo)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/flounder_widgets_init/#post-4357448)
 * > child theme loads before the parent theme
   >  one does not simply remove not added
   > action hook =)
 * Yes. But that doesn’t mean that functions added on the child-theme are executed
   first. All functions are collected first then executed depending on their priority
   or whenever they are called.
 * You should be able to accomplish what you want by adding this on your child-theme’s
   functions.php, just tested and it works as expected.
 *     ```
       function remove_default_sidebar() {
       	remove_action( 'widgets_init', 'flounder_widgets_init' );
       }
       add_action( 'after_setup_theme', 'remove_default_sidebar' );
   
       function add_custom_sidebar() {
       	register_sidebar( array(
       		'name'          => __( 'Sidebar', 'flounder' ),
       		'id'            => 'sidebar-1',
       		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
       		'after_widget'  => '</aside>',
       		'before_title'  => '<h1 class="widget-title">',
       		'after_title'   => '</h1>',
       	) );
       }
       add_action( 'widgets_init', 'add_custom_sidebar' );
       ```
   
 *  Thread Starter [Alexander Goncharov](https://wordpress.org/support/users/luzlol/)
 * (@luzlol)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/flounder_widgets_init/#post-4357454)
 * wow, that’s sweet! worked like a charm for me =)
 * thanks a lot Ron!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘flounder_widgets_init()’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/flounder/0.2.4/screenshot.png)
 * Flounder
 * [Support Threads](https://wordpress.org/support/theme/flounder/)
 * [Active Topics](https://wordpress.org/support/theme/flounder/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/flounder/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/flounder/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Alexander Goncharov](https://wordpress.org/support/users/luzlol/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/flounder_widgets_init/#post-4357454)
 * Status: resolved