rest-api integration with wp-job-manager
-
Hi,
I’ve followed the forum and managed to integrate the wp-job-manager plugin listings to provide me an output on the listing as follows. I’ve added additional post type and taxonomy as follows. But I am unable to get the listing data fields and custom fields data into the json response. Could anyone assist me in this?
Extra taxonomy
if ( isset( $wp_taxonomies[‘job_listing_category’] ) ) {
$wp_taxonomies[‘job_listing_category’]->show_in_rest = true;
$wp_taxonomies[‘job_listing_category’]->rest_base = ‘joblistingcategorys’;
$wp_taxonomies[‘job_listing_category’]->rest_controller_class = ‘WP_REST_Terms_Controller’;
}Extra post type
if ( isset( $wp_post_types[‘job_listing’] ) ) {
$wp_post_types[‘job_listing’]->show_in_rest = true;
$wp_post_types[‘job_listing’]->rest_base = ‘joblistings’;
$wp_post_types[‘job_listing’]->rest_controller_class = ‘WP_REST_Posts_Controller’;
}Thank you,
Eranga
- The topic ‘rest-api integration with wp-job-manager’ is closed to new replies.