Home › Forums › Support › Global post in GP hooks issue? This topic has 2 replies, 2 voices, and was last updated 8 years, 7 months ago by Tom. Viewing 3 posts - 1 through 3 (of 3 total) Author Posts February 7, 2015 at 5:49 am #73184 Pete I can’t get this snippet to work in the GP hooks… <?php if( get_post_meta($post->ID, "age", true) ): ?> Age: <?php echo get_post_meta($post->ID, "age", true); ?> <?php else: ?>age not specified <?php endif; ?> I think it may have something to do with the global post thingy? February 7, 2015 at 5:54 am #73185 Pete Found the fix… Replace $post->ID with get_the_ID() Found the solution here… February 7, 2015 at 10:41 am #73256 TomLead Developer Lead Developer Glad you sorted it out 🙂 Author Posts Viewing 3 posts - 1 through 3 (of 3 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In