Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

drizzt99 on "global $post and get_post() aren't working"

$
0
0

Hi,
I've used the global $post and get_post() a lot but now for some reason they stopped working when I view the site in Chrome incognito mode.
I put a code that sends me an email with the page ID.
I tried both global $post; mail(...,$post->ID,''); as well as the same with $post=get_post();.
In normal browser, it returns the post ID.
When I view in chrome incognito, it returns $post = 1;
Any idea why?
Thanks!


Viewing all articles
Browse latest Browse all 8245

Trending Articles