Skip Navigation

[Resolved] Blank Field

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 9 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by jasonw-2 9 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#222044

When using a custom field presenting it in an un-ordered list, is there any way to not have the blank space in the end result if the field is left blank?

I hope that makes sense.

Thanks.

#222264

Hi jasonw-2,

Are we talking about this case:

<ul>
<li>[types field="my-field"][/types]</li>
</ul>

If my-field is empty, you do not want display item

  • [types field="my-field"][/types]
  • It isn't possible within Types, You need create a custom function for it, check if the custom field value is not blank then display the item.
    If you have a copy of Views, you can use shortcode [wpv-if] to check it,
    More help:
    https://toolset.com/documentation/user-guides/conditional-html-output-in-views/#checking-for-empty-fields

    #223212

    I understand and will give it my best attempt.

    Thanks, Luoy!!

    The forum ‘Types Community Support’ is closed to new topics and replies.

    This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.