wordpress - Display Category Name of Current Post in WP Job Manager -
i m trying display job categories in wp job manager in single post(job listing).
i tried below code displaying "array".
function get_the_job_category( $id = false ) { $categories = get_the_terms( $id, 'job_category' ); if ( ! $categories || is_wp_error( $categories ) ) $categories = array(); $categories = array_values( $categories ); foreach ( array_keys( $categories ) $key ) { _make_cat_compat( $categories[$key] ); } /** * filters array of categories return post. * * @since 3.1.0 * @since 4.4.0 added `$id` parameter. * * @param array $categories array of categories return post. * @param int $id id of post. */ return apply_filters( 'get_the_job_categories', $categories, $id ); } how display current job post category name?
Comments
Post a Comment