Skip to content

Instantly share code, notes, and snippets.

@jbutko
Created September 9, 2013 16:43
Show Gist options
  • Save jbutko/6498268 to your computer and use it in GitHub Desktop.
Save jbutko/6498268 to your computer and use it in GitHub Desktop.
WP, PH: Avoid duplicate IDs when using two loops
// ID name in the first loop
id="post-<?php the_ID(); ?>"
// ID name in the second loop: added blog- before post
id="blog-post-<?php the_ID(); ?>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment