Title: Avoid duplicate element ID?
Last modified: April 28, 2019

---

# Avoid duplicate element ID?

 *  [thomaslindvig](https://wordpress.org/support/users/thomaslindvig/)
 * (@thomaslindvig)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/avoid-duplicate-element-id/)
 * I have put a widget at the top of my frontpage with this plugin, but it generates
   a widget with the same element ID as the one it is a copy of, which is shown 
   elsewhere on the homepage, at the same time.
    Now two elements have the same 
   ID, I think that is very bad CSS behavior. Can i use a tag in the short code 
   for generating custom ID?

Viewing 1 replies (of 1 total)

 *  Plugin Author [shazdeh](https://wordpress.org/support/users/shazdeh/)
 * (@shazdeh)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/avoid-duplicate-element-id/#post-11479024)
 * You can use the `container_id` parameter to change the `id` attribute, eg:
 *     ```
       [widget id="text-1" container_id="my-custom-widget"]
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Avoid duplicate element ID?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/widget-shortcode.svg)
 * [Widget Shortcode](https://wordpress.org/plugins/widget-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/widget-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/widget-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/widget-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/widget-shortcode/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [shazdeh](https://wordpress.org/support/users/shazdeh/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/avoid-duplicate-element-id/#post-11479024)
 * Status: not resolved