Skip to content

Instantly share code, notes, and snippets.

@tripflex
Last active November 27, 2019 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tripflex/38a6e5a20ae3b7738a70d6cfa033920b to your computer and use it in GitHub Desktop.
Save tripflex/38a6e5a20ae3b7738a70d6cfa033920b to your computer and use it in GitHub Desktop.
Enable Featured Image (thumbnail) for WP Job Manager Resumes
<?php
add_filter( 'register_post_type_resume', 'register_post_type_resume_enable_featured_image' );
// Unfortunately all reusme uploads must be attached (added to media library) to support featured image
add_filter( 'resume_manager_attach_uploaded_files', '__return_true' );
function register_post_type_resume_enable_featured_image( $post_type ) {
if( ! in_array( 'thumbnail', $post_type['supports'] ) ){
$post_type['supports'][] = 'thumbnail';
}
return $post_type;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment