post id number
-
Is there a way to get a post’s ID number w/o it being printed out? I tried the following:
<?php if (the_ID() == 2) echo “test”; ?>
and it printed out the ID number instead of ‘test’
I don’t see any other template tags that are applicable. Is there an easy way to pull it from the database?
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘post id number’ is closed to new replies.