Title: what does this code mean?
Last modified: August 19, 2016

---

# what does this code mean?

 *  [TomJohnson](https://wordpress.org/support/users/tomjohnson/)
 * (@tomjohnson)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/what-does-this-code-mean/)
 * In the register_sidebar function reference, the li id name is %1$s and the class
   is %2$s. Example:
 * `register_sidebar(array('name'=>'Sidebar Contact','before_widget' => '<div class
   ="widgy"><li id="%1$s"class="widget %2$s">','after_widget' => '</div>','before_title'
   => '<h2 class="widgettitle">','after_title' => '</h2>',));`
 * Does the %1$s and %2$s show the class of the widget with a special name, or what?
   I couldn’t find a description of what this code does. Thanks,
 * Tom

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

 *  [jon](https://wordpress.org/support/users/adiant/)
 * (@adiant)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/what-does-this-code-mean/#post-1377000)
 * Looking at the actual code, the comment preceding it says:
 * > Substitute HTML id and class attributes into before_widget
 *  Thread Starter [TomJohnson](https://wordpress.org/support/users/tomjohnson/)
 * (@tomjohnson)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/what-does-this-code-mean/#post-1377029)
 * Thanks.

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

The topic ‘what does this code mean?’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [TomJohnson](https://wordpress.org/support/users/tomjohnson/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/what-does-this-code-mean/#post-1377029)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
