Skip Navigation

[Résolu] 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 Il y a 9 années et 11 mois. 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 réponses, has 2 voix.

Last updated by jasonw-2 Il y a 9 années et 10 mois.

Assisted by: Luo Yang.

Auteur
Publications
#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!!

    Le forum ‘Types Community Support’ est fermé à de nouveaux sujets et réponses.

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