Title: Different code wrapping for each widget
Last modified: August 19, 2016

---

# Different code wrapping for each widget

 *  [godofcomics](https://wordpress.org/support/users/godofcomics/)
 * (@godofcomics)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/different-code-wrapping-for-each-widget/)
 * Hello, I cannot use the Array “Before” “After” to dress my widgets… I have real
   random and different coding for each widget.
 * For example:
 * Pages: Will be wrapped with have 4 divs
 * Blogroll: Will be wrapped with 2 divs
 * Is there a way to dress the “before” “after” for each WIDGET INDIVIDUALLY, instead
   of this array code from functions.php?
 *     ```
       <?php
       if ( function_exists('register_sidebar') )
           register_sidebar(array(
               'before_widget' => '<div id="right-red"><div id="right-red-top">',
               'after_widget' => '<div id="right-red-bottom"></div></div>',
               'before_title' => '<div id="right-red-title">',
               'after_title' => '</div><div id="right-red-text">%1$s</div></div>
       <ul>',
           ));
       ```
   

The topic ‘Different code wrapping for each widget’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [godofcomics](https://wordpress.org/support/users/godofcomics/)
 * Last activity: [18 years, 1 month ago](https://wordpress.org/support/topic/different-code-wrapping-for-each-widget/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
