06/22/2016 at 6:08 pm
#380367
Keymaster
@ Omar Brenes
re: so we would have to delete them in each individual entry?
Yes, unfortunately so.
That said, there might be an alternative, try this…
Install the Code Snippets plugin.
Add a new snippet with the following code:
add_filter( 'cn_entry_output_meta_key', 'cn_skip_empty_entry_meta_value', 10, 4 );
function cn_skip_empty_entry_meta_value( $html, $atts, $key, $value ) {
if ( 0 < strlen( $value ) ) return '';
return $html;
}
Save and Activate the snippet.
This is untested, but if it works, it should “skip” rendering any meta keys where the value is empty.
Hope this helps, let me know.
