Title: different design &quot;after_widget&quot;
Last modified: August 19, 2016

---

# different design "after_widget"

 *  [grusl](https://wordpress.org/support/users/grusl/)
 * (@grusl)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/different-design-after_widget/)
 * Hey,
    I have made a own theme, and I have a question about the register_sidebar()
   array in functions.php.
 * my funtions.php looks like this:
 * if ( function_exists(‘register_sidebar’) )
    register_sidebar(array( ‘before_widget’
   => ‘<li id=”%1$s” class=”widget %2$s”>’, ‘after_widget’ => ‘<hr align=”left” 
   width=”180″ color=”#c9c9c9″ size=”1″>’, ‘before_title’ => ‘<h2>’, ‘after_title’
   => ‘</h2>’, ));
 * Now after every widget I have displayed the “<hr>” tag, wich makes a line under
   every widget.
    It also makes a line under the last widget in the sidebar and 
   I want to remove this line.
 * So I only want the “<hr>” tag displayed between widgets, but not under the last
   widget in the sidebar.
    Can anyone help me?
 * greetings

Viewing 1 replies (of 1 total)

 *  [Edward Caissie](https://wordpress.org/support/users/cais/)
 * (@cais)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/different-design-after_widget/#post-1604282)
 * Your ‘after_widget’ should be closing the `<li>` tag you opened in ‘before_widget’.
   You might also consider using a CSS `<div>` class in ‘after_widget’ as well to
   create, and style, a ‘hr’ like item to your taste.
 * This will help with adding another CSS selector to identify the ‘li:last-child”
   to not show the line after the last widget.
 * NB: These are suggestions only, you will have to adjust to your specific theme
   code.

Viewing 1 replies (of 1 total)

The topic ‘different design "after_widget"’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [Edward Caissie](https://wordpress.org/support/users/cais/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/different-design-after_widget/#post-1604282)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
