• I’m building my own theme from scratch and it’s coming along rather well, but I’m struggling to understand how WordPress names widget IDs (I’m trying to understand it for the sake of coding their css).

    For example, the recent-posts widget. I’m only using it in one place (obviously, right?) yet WordPress is giving it the following ID: “recent-posts-2” instead of just “recent-posts”. recent-comments is doing the same thing. When I view the published page source, it’s showing up as “recent-comments-2”

    recent-posts-2
    recent-comments-2
    categories-2
    meta-2

    …but each of these widgets is only being used once. What’s going on here, and why?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Help with WordPress Widget IDs: Why are mine ending with "-2"?’ is closed to new replies.