I had this exact same issue, but it’s a problem with the Jobroller theme (seeing as the custom post type is job_listing
, I’m guessing you’re using Jobroller as well).
The Jobroller theme adds the custom columns to the job_listing
custom post type using the function jr_edit_jobs_columns
in the file jobroller/includes/admin/admin-post-types.php
:
function jr_edit_jobs_columns( $columns ){
$columns = array(
'cb' => '<input type="checkbox" />',
'title' => __('Job Name', APP_TD),
'author' => __('Job Author', APP_TD),
'job_cat' => __('Job Category', APP_TD),
'job_type' => __('Job Type', APP_TD),
'job_salary' => __('Salary', APP_TD),
'company' => __('Company', APP_TD),
'location' => __('Location', APP_TD),
'expire_date' => __('Expire Date', APP_TD),
'date' => __('Date', APP_TD),
'logo' => __('Logo', APP_TD),
);
return $columns;
}
But this function does it incorrectly, it simply redefines the columns instead of adding and removing columns to the existing list. So any columns you add in a child theme will be removed before the page is rendered (Because child themes get executed first).
You should edit that function like so:
function jr_edit_jobs_columns( $columns ){
$new_columns = array(
'cb' => '<input type="checkbox" />',
'title' => __('Job Name', APP_TD),
'author' => __('Job Author', APP_TD),
'job_cat' => __('Job Category', APP_TD),
'job_type' => __('Job Type', APP_TD),
'job_salary' => __('Salary', APP_TD),
'company' => __('Company', APP_TD),
'location' => __('Location', APP_TD),
'expire_date' => __('Expire Date', APP_TD),
'date' => __('Date', APP_TD),
'logo' => __('Logo', APP_TD),
);
unset($columns['cb']);
unset($columns['title']);
unset($columns['author']);
unset($columns['taxonomy-job_location']);
unset($columns['taxonomy-job_cat']);
unset($columns['comments']);
unset($columns['date']);
return $new_columns + $columns; // This way your custom columns are at the end
}