Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author chertz

    (@chertz)

    You can use something like this for now:

    <?php if(!empty(get_ept_field(‘film_format’))) the_ept_field(‘film_format’); ?>

    Thread Starter gisselsson

    (@gisselsson)

    Thanks for the suggestion.
    However that snippet returns
    Fatal error: Can’t use function return value in write context …

    Does it have to be added somewhere else but where I want the fields to show up (or not)?

    Plugin Author chertz

    (@chertz)

    Try doing this way, which works only for TextFields.

    <?php
    $val=get_ept_field(‘film_format’,array(‘raw’=>true));
    if(!empty($val)) the_ept_field(‘film_format’);
    ?>

    Next release will have a parameter for not showing the field if empty.

    Thread Starter gisselsson

    (@gisselsson)

    That worked perfectly. Thank you!

    Anyone to get JUST the text from textfields?

Viewing 5 replies - 1 through 5 (of 5 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.