Show post object of any page in frontend
Because in functions.php, it is too early to just run the print_r(), you may run it within a init hook like this: Placing it inside theme’s functions.php add_action( ‘init’, ‘test_trace’ ); function test_trace() { global $post; print_r($post); }