Conditional Logic Surround Fields in Directory Template
-
How would I go about adding conditional logic to custom fields on a custom directory template? Below is what I am trying to accomplish with no luck:
<li class="fas fa-phone"><?php $mobile_number = um_user('mobile_number');if (!empty($mobile_number)) {?> <li class="fas fa-phone"><code>user.mobile_number</code></li> <?php } ?>
So if the custom field has content then it should show that field. Any thoughts on this?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Conditional Logic Surround Fields in Directory Template’ is closed to new replies.