• Hi all, I’d like to know if it’s possible to avoid the writing of a custom field when its value is empty. I’ve created a Smart Custom Fields “meta box” with some text fields, and make it appear on edit page for all my posts. If I leave all or some of cf in meta box empty, their meta_key are written to wp_postmeta table anyway with empty meta_value. I’d like to prevent this since I use <?php the_meta(); ?> in my php template and it will show

    • cf-1:
    • cf-2:
    • cf-n

    Is it possible to change this behaviour, if it’s not done by purpose?
    Thanks a lot.
    Federico.

  • The topic ‘Avoid writing cf when value is empty’ is closed to new replies.