What I want to do is display my latest post's content on a custom template page, ONLY if a meta box is filled in with the right word. In other words, if the post has a meta box named, "FEATURED" with a value of "YES", then I would like to show the post on my custom template page. If the "FEATURED" meta box says, "NO", then I do not want the post to show up. With some previous help, I am currently using the following to show the latest post on my homepage:
$my_most_recent_post = get_posts( 'numberposts=1' ); $my_most_recent_post_id = $my_most_recent_post->ID;
My homepage will show the latest post no matter what, but on this particular page, I only want it to display conditionally depending on the meta box. So can I take that code and make it work in a conditional statement?