My code to get a list of jobpost is this, but in this list don't show job types
$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()
) );
My code to get a list of jobpost is this, but in this list don't show job types
$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()
) );
Share
Improve this question
edited Jun 18, 2020 at 16:30
fuxia♦
107k38 gold badges255 silver badges459 bronze badges
asked Jun 18, 2020 at 14:58
AstercrakerAstercraker
12 bronze badges
2
|
1 Answer
Reset to default 0This is my solution
$types = wp_get_post_terms($post->ID, 'jobpost_job_type');
var_dump($types);
jobpost
the correct slug for the post type? – jdm2112 Commented Jun 18, 2020 at 16:22