Skip to content

Instantly share code, notes, and snippets.

@renemorozowich
Last active March 28, 2019 00:14
Show Gist options
  • Save renemorozowich/fc03d335ddc39251456c44ff536c81fa to your computer and use it in GitHub Desktop.
Save renemorozowich/fc03d335ddc39251456c44ff536c81fa to your computer and use it in GitHub Desktop.
Changing Columns on the Job Dashboard of WP Job Manager
<?php
// Customize columns in WP Job Manager [job_dashboard].
function custom_job_manager_job_dashboard_columns( $columns ) {
// Remove all columns.
unset( $columns['job_title'] );
unset( $columns['filled'] );
unset( $columns['date'] );
unset( $columns['expires'] );
// Add columns with proper headings in the correct order.
$columns['job_id'] = 'ID';
$columns['job_title'] = 'Job';
$columns['date'] = 'Date';
$columns['job_location'] = 'Location';
$columns['filled'] = 'Filled';
$columns['expires'] = 'Expires';
// Return.
return $columns;
}
// Populate ID column.
add_action( 'job_manager_job_dashboard_column_job_id', function( $post ) {
echo $post->ID;
} );
// Populate Location column.
add_action( 'job_manager_job_dashboard_column_job_location', function( $post ) {
echo get_post_meta( $post->ID, '_job_location', true );
} );
@bigfootbs
Copy link

bigfootbs commented Mar 28, 2019

Hi,
the question might be "stupid" but I'm really looking for a solution to my problem.
Where should I put (path or folder) this functions.php file in order to get the desired functionality?

Thank you in advance!

Best,
Nas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment