Wordpress get_the_ID() returns nothing but get_the_title() returns title?
Posted
by John
on Stack Overflow
See other posts from Stack Overflow
or by John
Published on 2010-03-12T14:14:59Z
Indexed on
2010/03/12
14:17 UTC
Read the original article
Hit count: 203
I'm struggling with wordpress templates. In one of my theme templates I have the following lines
<?php
echo get_the_ID(); // displays nothing
echo get_the_title(); // displays "Hello World! this is title"
?>
Why does the get_the_ID() return nothing ? I want the page id of the current page I'm on.
© Stack Overflow or respective owner