how to get the proper post id on a static page with a post on it
I’ve been struggling for couple hours now to get the post id of a static page on which i’ve added the loop to display some posts in a certain category. I know that the page id for the static page is 18 while the id of the first post displayed on the page is 165.
Now, when I use the_ID() I get 165 or if I try is_page(’18’) it returns false! Why is it returning the id of the first post instead of the parent page?
Any idea what am I doing wrong here?
- The topic ‘how to get the proper post id on a static page with a post on it’ is closed to new replies.