Home › Forums › Front-end Issues › Custom Taxonomy in ACF › Reply To: Custom Taxonomy in ACF
Alright 🙂
Altho this:
<?php
if (get_field('sub_specialty') != '') { ?>
says “do stuff if this field is not an empty string”
while this (in my code):
<?php if (get_field('sub_specialty')) { //Sub speciality ?>
says “do stuff if this field has any values”. So you should still use that instead 🙂 Its pretty much a shorthand.. say if you want to apply something when there’s no field it could say this:
<?php if (!get_field('sub_specialty')) { //Sub speciality ?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.