Title: Widgetizing Theme (Acting Up)
Last modified: August 19, 2016

---

# Widgetizing Theme (Acting Up)

 *  [joelrunyon](https://wordpress.org/support/users/joelrunyon/)
 * (@joelrunyon)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/widgetizing-theme-acting-up/)
 * Can anybody help me with this? I’m having a heck of a time using widgets on a
   theme I got.
 * My website is here:
    [http://longrun.joelrunyon.com/](http://longrun.joelrunyon.com/)
 * The problem I’m having is the theme is supposedly “already widgetized” and the
   code seems to be inserted already:
 * > <div id=”sidebar”>
   >  <?php if ( 1 || (!function_exists(‘dynamic_sidebar’) ||!
   > dynamic_sidebar(1) )) : ?> <div class=”sidebar_box” id=”sidebar_news”> <h2>
   > Company News</h2> <div class=”sidebar_box_body”>
    - Lorem ipsum dolor sit amet, to the consectetuer to adipiscing elit. for Quisque
      sed felis. Aliquam [Read More](https://wordpress.org/support/topic/widgetizing-theme-acting-up/?output_format=md#)
    - Lorem ipsum dolor sit amet, to the consectetuer to adipiscing elit. for Quisque
      sed felis. Aliquam [Read More](https://wordpress.org/support/topic/widgetizing-theme-acting-up/?output_format=md#)
    - Lorem ipsum dolor sit amet, to the consectetuer to adipiscing elit. for Quisque
      sed felis. Aliquam [Read More](https://wordpress.org/support/topic/widgetizing-theme-acting-up/?output_format=md#)
 *  </div><!– /sidebar_box_body –>
    </div><!– /sidebar_box –> <?php endif; ?> <?
   php if ( 1 || (!function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(2) )) :?
   > <div class=”sidebar_box” id=”sidebar_articles”> <h2>Useful Articles</h2> <div
   class=”sidebar_box_body”>
    - [Estate Planning Checklist](https://wordpress.org/support/topic/widgetizing-theme-acting-up/?output_format=md#)
    - [How to Choose a Trustee Need Additional Income? ](https://wordpress.org/support/topic/widgetizing-theme-acting-up/?output_format=md#)
    - [Municipal Bonds May Be an Option](https://wordpress.org/support/topic/widgetizing-theme-acting-up/?output_format=md#)
    - [Need a New Car? How to Cash In Your Clunker](https://wordpress.org/support/topic/widgetizing-theme-acting-up/?output_format=md#)
    -  <li class=”last”>[Recently Widowed? How to Financially Survive the Death of a Loved One](https://wordpress.org/support/topic/widgetizing-theme-acting-up/?output_format=md#)
 *  </div><!– /sidebar_box_body –>
    </div><!– /sidebar_box –> <?php endif; ?> </
   div>
 * The functions code is there too:
 * > if ( function_exists(‘register_sidebar’) ) {
   >  register_sidebars(1, array( ‘
   > before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’, ‘after_widget’ => ‘
   > </div>’, ‘before_title’ => ‘<h2>’, ‘after_title’ => ‘</h2>’, ));
 * I know how to usually widgetize a theme, but this is not working out at all…
 * any help?

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

 *  [jonimueller](https://wordpress.org/support/users/jonimueller/)
 * (@jonimueller)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/widgetizing-theme-acting-up/#post-1274676)
 * When you go to Appearance and Widgets in your WP dashboard, are the places for
   you to put widgets? Looks like you should have two sidebars.
 * P.S. You don’t happen to be related to Perry Runyon, do you? Went to school with
   him (San Antonio, Texas) more years ago than I really wish to admit. I think 
   that’s kind of an odd name. 🙂
 *  Thread Starter [joelrunyon](https://wordpress.org/support/users/joelrunyon/)
 * (@joelrunyon)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/widgetizing-theme-acting-up/#post-1274696)
 * MY NAME IS NORMAL!!! haha. Just playin. No I don’t know a Perry. I was in San
   Antonio 2 summers ago though!
 * About the sidebars. They do show up in the backend. I actually get 3 (which I
   thought was weird cause I could only find 2 in the code). 1 labled “sidebar” 
   then “sidebar1” and “sidebar2.” I place my widgets just fine in the backend but
   when I goto the site, they don’t show up. I don’t know whats up.
 *  [jonimueller](https://wordpress.org/support/users/jonimueller/)
 * (@jonimueller)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/widgetizing-theme-acting-up/#post-1274799)
 * You might want to start over with the widgets. Decide where you want your widgets
   and how many you’ll want. In one design we did, I have custom widgetized sidebars
   for each page, plus an actual sidebar widget, and three footer widgets.
 * Here’s my code. Notice that you can NAME each sidebar by including it between
   the `'` in the parentheses. This goes in your functions.php file, I think you
   can figure out where to swap out the current widget code with this code. And 
   of course, your styles will be different from mine, but this gives you an idea
   of their flexibility.
 *     ```
       if ( function_exists('register_sidebar') ){
           register_sidebar(array(
           'name' => 'sb-about',
           'before_widget' => '<div class="navbox">',
           'after_widget' => '</div>',
           'before_title' => '<h3 class="widgettitle">',
           'after_title' => '</h3>',
       ));
           register_sidebar(array(
           'name' => 'sb-contact',
           'before_widget' => '<div class="navbox">',
           'after_widget' => '</div>',
           'before_title' => '<h3 class="widgettitle">',
           'after_title' => '</h3>',
       ));
           register_sidebar(array(
           'name' => 'sidebar',
           'before_widget' => '<div class="navbox">',
           'after_widget' => '</div>',
           'before_title' => '<h3 class="widgettitle">',
           'after_title' => '</h3>',
       ));
           register_sidebar(array(
           'name' => 'footer1',
           'before_widget' => '<div class="navbox">',
           'after_widget' => '</div>',
           'before_title' => '<h3 class="widgettitle">',
           'after_title' => '</h3>',
       ));
           register_sidebar(array(
           'name' => 'footer2',
           'before_widget' => '<div class="navbox">',
           'after_widget' => '</div>',
           'before_title' => '<h3 class="widgettitle">',
           'after_title' => '</h3>',
       ));
           register_sidebar(array(
           'name' => 'footer3',
           'before_widget' => '<div class="navbox">',
           'after_widget' => '</div>',
           'before_title' => '<h3 class="widgettitle">',
           'after_title' => '</h3>',
       ));
       ```
   
 * And then in your templates, call them as follows (place this line where you want
   the widget to appear):
 * `<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer1')):?
   >`
 * And don’t forget to change the name to match what you’ve laid out in your functions.
   php file. 🙂
 *  Thread Starter [joelrunyon](https://wordpress.org/support/users/joelrunyon/)
 * (@joelrunyon)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/widgetizing-theme-acting-up/#post-1274821)
 * I’m thinking I might just scrap the theme anyways…
 * It’s not exactly what I’m looking for and it’s coded strangely…If I keep it, 
   I’ll definitely take your advice. Thanks!
 *  [jonimueller](https://wordpress.org/support/users/jonimueller/)
 * (@jonimueller)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/widgetizing-theme-acting-up/#post-1274847)
 * Hi, Joel. The code that I posted above will work with just about any theme. 🙂

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

The topic ‘Widgetizing Theme (Acting Up)’ is closed to new replies.

## Tags

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

 * 5 replies
 * 2 participants
 * Last reply from: [jonimueller](https://wordpress.org/support/users/jonimueller/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/widgetizing-theme-acting-up/#post-1274847)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
