How does one get a custom post by id? FYI: I am passing a particular post id through a form and it's performing an ajax call.
I'd like to retrieve just one post and grab the title:
<?php // E.g. $loc = 700 $args = array('post_id'=>$loc, 'post_type'=>'seminars', 'limit'=> '1'); $loop = new WP_Query($args); // Start loop for seminar posts $loop->the_post(); echo the_title(); // returns just one post and it's not the right custom post