Title: Code that puts unique (html) IDs for each widget
Last modified: August 19, 2016

---

# Code that puts unique (html) IDs for each widget

 *  [skunkhunt](https://wordpress.org/support/users/skunkhunt/)
 * (@skunkhunt)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/code-that-puts-unique-html-ids-for-each-widget/)
 * I need a code block (PHP) that can force all my widgets to have unique IDs (in
   HTML) so that I can reference them in my CSS file to turn them on or off.
 * You can say I’m lazy but I know someone invented the wheel before I did

Viewing 1 replies (of 1 total)

 *  Thread Starter [skunkhunt](https://wordpress.org/support/users/skunkhunt/)
 * (@skunkhunt)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/code-that-puts-unique-html-ids-for-each-widget/#post-1133223)
 * I found the answer!
 * [http://wordpress.org/support/topic/256707?replies=4](http://wordpress.org/support/topic/256707?replies=4)
 * It worked.

Viewing 1 replies (of 1 total)

The topic ‘Code that puts unique (html) IDs for each widget’ is closed to new replies.

## Tags

 * [html](https://wordpress.org/support/topic-tag/html/)
 * [id](https://wordpress.org/support/topic-tag/id/)
 * [set](https://wordpress.org/support/topic-tag/set/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 1 reply
 * 1 participant
 * Last reply from: [skunkhunt](https://wordpress.org/support/users/skunkhunt/)
 * Last activity: [16 years, 10 months ago](https://wordpress.org/support/topic/code-that-puts-unique-html-ids-for-each-widget/#post-1133223)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
