Title: Getting theme widget ready&#8211;
Last modified: August 18, 2016

---

# Getting theme widget ready–

 *  [dominoeffect](https://wordpress.org/support/users/dominoeffect/)
 * (@dominoeffect)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/getting-theme-widget-ready/)
 * I’m attempting to get the second sidebar on the Gridfocus theme widget-ready,
   and studying from this forum post:
 * [http://wordpress.org/support/topic/114391?replies=42](http://wordpress.org/support/topic/114391?replies=42)
 * and this guide:
 * [http://automattic.com/code/widgets/themes/](http://automattic.com/code/widgets/themes/)
 * If anyone can help me clarify exactly where to start / what to do I would _really_
   appreciate it!
 *  One thing I’d like to say: the sidebar I want to widgetise isn’t called sidebar.
   php, it’s called second.php, is this a problem?? will I need to rename it and
   every other reference to it??
 * Like I said, I’d really appreciate some guidance on basic points of what I need
   to do here,
 * thanks!
 * Edit: link to grid focus theme
 * [http://5thirtyone.com/grid-focus](http://5thirtyone.com/grid-focus)

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

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/getting-theme-widget-ready/#post-656077)
 * If more than one sidebar… take a look at these threads:
    [http://wordpress.org/search/multiple+sidebars+widgets?forums=1](http://wordpress.org/search/multiple+sidebars+widgets?forums=1)
 *  Thread Starter [dominoeffect](https://wordpress.org/support/users/dominoeffect/)
 * (@dominoeffect)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/getting-theme-widget-ready/#post-656084)
 * Hey moshu, Thanks!
 * one question: does that matter if i only want to widgetise one of the sidebars?
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/getting-theme-widget-ready/#post-656086)
 * Well, in that case you don’t have to worry about the code for multiple sidebars.
 *  Thread Starter [dominoeffect](https://wordpress.org/support/users/dominoeffect/)
 * (@dominoeffect)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/getting-theme-widget-ready/#post-656093)
 * Cool man thanks.
 * ANy help on the original points would also be appreciated. Having no joy with
   it at all!
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/getting-theme-widget-ready/#post-656094)
 * You already found all the necessary documentation for widgetizing.
 * Apply the widget call code to your sidebar file. Don’t forget to close the if
   statement.
    Add a functions.php file to your theme (can copy from classic). If
   you are using a second sidebar file, e.g. named mysidebar.php -> modify the functions.
   php code to reflect its name. Call that custom sidebar with the proper include
   line: `<?php include (TEMPLATEPATH . '/mysidebar.php'); ?>` That’s it.
 *  Thread Starter [dominoeffect](https://wordpress.org/support/users/dominoeffect/)
 * (@dominoeffect)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/getting-theme-widget-ready/#post-656098)
 * Ok, so I’ve added code to the sidebar (second.php) to make it look like this
 *     ```
       <div id="midCol">
       	<?php if ( !function_exists('dynamic_sidebar')
               || !dynamic_sidebar() ) : ?>
   
       .....SIDEBAR CONTENT
   
           <?php endif; ?>
       </div>
       ```
   
 * And added this to the top of functions.php in the wp-include folder:
 *     ```
       <?php
       if ( function_exists('register_sidebar') )
           register_sidebar(array(
               'before_widget' => '',
               'after_widget' => '',
               'before_title' => '<div class="title">',
               'after_title' => '</div>',
           ));
       ?>
       ```
   
 * But in the admin panel it’s still not recognising the sidebar, although it looks
   ok.
 * Any ideas people?
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/getting-theme-widget-ready/#post-656100)
 *     ```
       <?php
       if ( function_exists('register_sidebar') )
           register_sidebar(array('name'=>'second',
               'before_widget' => '',
               'after_widget' => '',
               'before_title' => '<div class="title">',
               'after_title' => '</div>',
           ));
       ?>
       ```
   
 *  Thread Starter [dominoeffect](https://wordpress.org/support/users/dominoeffect/)
 * (@dominoeffect)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/getting-theme-widget-ready/#post-656101)
 * Ahh so I shouldn’t be editing functions.php in the wp-include folder, but making
   a newbie in the actual theme folder, right?
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/getting-theme-widget-ready/#post-656102)
 * Yes, nobody ever talked about the wp-include folder.
    I explicitely told you:**
   Add a functions.php file to your theme (can copy from classic).**
 *  Thread Starter [dominoeffect](https://wordpress.org/support/users/dominoeffect/)
 * (@dominoeffect)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/getting-theme-widget-ready/#post-656103)
 * I wrote that post before your reply came up, sorry. I stupidly assumed it was
   the other functions.php file.
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/getting-theme-widget-ready/#post-656104)
 * Rule of thumb: don’t do anything until you are sure you got the latest reply 
   and being sure you understood it 🙂
 *  Thread Starter [dominoeffect](https://wordpress.org/support/users/dominoeffect/)
 * (@dominoeffect)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/getting-theme-widget-ready/#post-656106)
 * Learned 🙂
 *  Thread Starter [dominoeffect](https://wordpress.org/support/users/dominoeffect/)
 * (@dominoeffect)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/getting-theme-widget-ready/#post-656118)
 * Ok the sidebar is now sidebar-conscious, thank you for all your help and understanding
   Moshu.
 * I will probably be back with another mad enquiry + learned patience! Thanks again
   bro.
 *  [gfurst](https://wordpress.org/support/users/gfurst/)
 * (@gfurst)
 * [18 years ago](https://wordpress.org/support/topic/getting-theme-widget-ready/#post-656328)
 * Hello there… i’m with a similar problem….
    Trying to read about but only getting
   more lost. I tried to read something on that API about widget… but i’m afraid
   i might die if continued….
 * Here is the thing… i did make the first bar widgetized, but my theme has a total
   of four colums, the first/page content/and the others two.
    And aparently the
   others two are in obar.php(nao-sapien theme). And now i have no idea what step
   to take…
 * Where i put what??? and about the name thing? Please help me, and be patient.
   thank you

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

The topic ‘Getting theme widget ready–’ is closed to new replies.

## Tags

 * [sidebar](https://wordpress.org/support/topic-tag/sidebar/)

 * 14 replies
 * 3 participants
 * Last reply from: [gfurst](https://wordpress.org/support/users/gfurst/)
 * Last activity: [18 years ago](https://wordpress.org/support/topic/getting-theme-widget-ready/#post-656328)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
