- This topic has 2 replies, 2 voices, and was last updated 7 years, 4 months ago by .
- The topic ‘Duplicate ID's’ is closed to new replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
Someone told me that Duplicate ID's are basically bad. What?
Ids can only be used once on a specific page. An Id can be used on multiple pages.
A class name can be used multiple times on a page and also on multiple pages.
I have no idea what this person is talking about and no clue how to tell in a theme if it has one and how to fix? Or should I not worry about what this person said and continue drinking this 24 ounce cup of coffee I just made.
I don't know if this person referring to what I did. I left the default code stuff for the Genesis Search box with the author pro theme, I did find instructions how to add Google search to your Genesis Search box so I followed there advice. Not sure if I have duplicate ID's for the search box or am I missing something completely in my theme files. I really want to understand about this cause I am not a designer at all and only experiement with stuff which tends to get me in a mess.
Element IDs should be unique. The IDs he's referring to are in the Genesis eNews Widget. There's nothing you can do to change that since you are using the widget twice on the page. If you run your page through a HTML validator, it will produce a warning, not an error. Here;s more about IDs and Classes: https://www.w3.org/TR/html401/struct/global.html#h-7.5.2
That's for the advice and link. I may scratch one of the widget's anyways. My brain is starting to warm up with idea's for the blog. lol
© 2023 WPEngine, Inc.