Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm trying to achieve a similar effect to get_page($id), but with the current post acting as the argument for get_post(). Something like this pseudocode: get_post($this=>ID); .

Seems simple, but I can't find the it in the docs.

share|improve this question
add comment

1 Answer

Found it here: http://stackoverflow.com/questions/4893435/getting-the-wordpress-post-id-of-current-post

$id = get_the_ID();
var_dump(get_post($id));
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.