Skip to content

Instantly share code, notes, and snippets.

@tripflex
Created January 18, 2022 00:31
Show Gist options
  • Save tripflex/b2ef3cc6fc1363d0f9cc39af0ee47eac to your computer and use it in GitHub Desktop.
Save tripflex/b2ef3cc6fc1363d0f9cc39af0ee47eac to your computer and use it in GitHub Desktop.
Disable auto remove empty meta fields on listings when using WP Job Manager Field Editor
<?php
// Remove the line below if you want to keep this handling on the frontend
add_filter( 'field_editor_save_custom_fields_remove_empty_value_fields', '__return_false' );
// Remove the line below if you want to keep this handling in the admin area
add_filter( 'field_editor_save_admin_custom_fields_remove_empty_value_fields', '__return_false' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment