Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions includes/class-wp-job-manager-post-types.php
Original file line number Diff line number Diff line change
Expand Up @@ -847,11 +847,12 @@ public function job_feed_namespace() {
* Adds custom data to the job feed.
*/
public function job_feed_item() {
$post_id = get_the_ID();
$location = get_the_job_location( $post_id );
$company = get_the_company_name( $post_id );
$job_types = wpjm_get_the_job_types( $post_id );
$salary = get_the_job_salary( $post_id );
$post_id = get_the_ID();
$location = get_the_job_location( $post_id );
$company = get_the_company_name( $post_id );
$job_types = wpjm_get_the_job_types( $post_id );
$job_categories = wpjm_get_the_job_categories( $post_id );
$salary = get_the_job_salary( $post_id );

if ( $location ) {
echo '<job_listing:location><![CDATA[' . esc_html( $location ) . "]]></job_listing:location>\n";
Expand All @@ -860,6 +861,10 @@ public function job_feed_item() {
$job_types_names = implode( ', ', wp_list_pluck( $job_types, 'name' ) );
echo '<job_listing:job_type><![CDATA[' . esc_html( $job_types_names ) . "]]></job_listing:job_type>\n";
}
if ( ! empty( $job_categories ) ) {
$job_categories_names = implode( ', ', wp_list_pluck( $job_categories, 'name' ) );
echo '<job_listing:job_category><![CDATA[' . esc_html( $job_categories_names ) . "]]></job_listing:job_category>\n";
}
if ( $company ) {
echo '<job_listing:company><![CDATA[' . esc_html( $company ) . "]]></job_listing:company>\n";
}
Expand Down
Loading