WordPress.org

Support

Support » Plugins and Hacks » WP Easy Post Types » [Plugin: WP Easy Post Types] How do I show field & label only if the field has a value

[Plugin: WP Easy Post Types] How do I show field & label only if the field has a value

  • Hey There

    Thanks for a great plug in!

    I have one question though. How do you make it display a field and its label only if the field has a value?

    By using <?php the_ept_field('film_format'); ?>
    it displays the field label regardless if the user has entered a value into the field ‘film_format’.

    Greatful for any help!

    http://wordpress.org/extend/plugins/easy-post-types/

Viewing 1 replies (of 1 total)
  • Plugin Author chertz

    @chertz

    Right now you can use get_ept_field(‘film_format’) before and check for emptiness, such as: if (!empty(get_ept_field(‘film_format’)))

    In a future release we can add an option for “show label if not empty,” but for right now this would be the workaround.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP Easy Post Types] How do I show field & label only if the field has a value’ is closed to new replies.
Skip to toolbar