My code to get a list of jobpost is this
$active_jobs = get_posts( array(
'post_type' => 'jobpost',
'post_status' => array( 'publish', 'pending' ),
'ignore_sticky_posts' => 1,
'posts_per_page' => 3
,
'author' => get_current_user_id()
) );
Go to Source
Author: Astercraker