Questions tagged [get-post]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6
votes
1answer
4k views

get_post() vs global $post or $GLOBAL['post']

I'm writing a widget plugin and need access to post information. I've seen people using 3 different approaches: global $post; if ( isset( $GLOBALS['post'] ) ) $post = $GLOBALS['post']; $post = ...