[Resolved] [Plugin: Advanced Custom Fields] Can custom fields be *optional*?
I am 100% new to php so please forgive the ignorance in my question.
I have followed directions and managed to get custom fileds into my template page. However, I wonder if there is some sort of code which can conditionally prevent a field from appearing if the value is left blank (or if value = “blank”)
An example to illustrate the functionality I am after: my client offers sports training. Each course he offers has a list of details (price, location, training duration, number of participants, etc…). Then there are certain trainings in which only a certain number of those fields apply (for example: a one-on-one training obviously excludes the need to specify number of participants)
Is there a piece of code which could specify that if a certain field has a value of “blank” or “empty” (or even better, if it is just left blank in the dashboard), then that field will not appear?
Currently, all my fields appear no matter what.
Thanks in advance.
- The topic ‘[Resolved] [Plugin: Advanced Custom Fields] Can custom fields be *optional*?’ is closed to new replies.