• Not sure if I should have asked this in here or at Themes, either way this is not a solution seeking question, more of something that has been bugging me for some time. Just want to know why things work this way.

    Example, WordPress’s own twenty-sixteen theme’s footer is <footer id=”colophon” class=”site-footer” role=”contentinfo”>

    Why is there a need for both #colophon and .site-footer? There are more instances of such thing happening. Why does it has #primary, when it only uses .site-content? Is there a reason why?

Viewing 1 replies (of 1 total)
  • Speaking from my experience and not as an official answer, I like having the IDs around, plus classes. I have an old school practice of putting JavaScript event listeners on IDs as opposed to classes when they only need to be fired on specific elements.

Viewing 1 replies (of 1 total)
  • The topic ‘Why WP theme has both ID and class for same element?’ is closed to new replies.