• I have this tag in my theme but am not sure what purpose it serves:

    <?php the_ID(); ?>

    Removing it doesn’t seem to change anything, so why should I keep it?

    I read somewhere that it gives each post a unique id. If this is so, then does that mean I can put a post under multiple categories and not have to worry about duplicate content?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter benjamin_sp

    (@benjamin_sp)

    I read that codex page before posting, and it didn’t help. It says:

    Displays the numeric ID of the current post.

    &

    Provides a unique anchor identifier to each post.

    What does any of this mean in practical terms?

    Yes. You can place a post in multiple categories. One post can appear in several categories, and still be only one post. Why are you considering removing it is the more intriguing question.

    Thread Starter benjamin_sp

    (@benjamin_sp)

    Why are you considering removing it

    I just don’t like having anything extra that’s all. I know I can assign the same post to multiple categories. But search engines can penalize a website for that (duplicate content). So it is recommended that only one category be used. I was just wondering if this tag can be used so that I can assign posts to multiple categories and still not have to worry about the duplicate content issue.

    I can honestly say that I don’t believe I have ever read a discussion on the topic of duplicate content ( as interpreted by search engines ) that related to the use of <?php the_ID(); ?>. Maybe there is a guru out there who can efficiently break down the actual explanation of why you shouldn’t (or should) worry about it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘What is the point of this tag: <?php the_ID(); ?>’ is closed to new replies.