getting the post iD outside of the loop
-
is it possible to generate the post ID outside of the loop?
<?php the_ID(); ?> will not work when put in a javascript in my <head>
i want to use this on a page where there are multiple posts.
i want to include the post id in a javascript function and it wont work outside of the loop.
is that possible?
- The topic ‘getting the post iD outside of the loop’ is closed to new replies.