Support » Themes and Templates » <?php the_ID(); ?> doesn’t work

  • Thanks in advance for the help.

    I have a problem with <?php the_ID(); ?>

    I have this code in my template

    <div class="post" id="post-<?php the_ID(); ?>">

    but it doesn’t seem to work because when I see the source code it says

    <div class="post" id="post-<?php the_ID(); ?>">

    I know it is not very important but I cannot validate the webpage with such id name.

    Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter tourvista

    (@tourvista)

    My mistake,

    I was looking at the wrong place.
    I had written

    <div class="post" id="post-<?php the_ID(); ?>">

    in my code somewhere else

    Cheers!

Viewing 1 replies (of 1 total)
  • The topic ‘<?php the_ID(); ?> doesn’t work’ is closed to new replies.