Home Forums Front-end Issues Custom Taxonomy in ACF Reply To: Custom Taxonomy in ACF

  • Alright 🙂

    Altho this:

    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 ?>