Support

Account

Home Forums General Issues Hiding empty Fields from Post Category Reply To: Hiding empty Fields from Post Category

  • You’ll want to wrap a check around the field value, something like:

    
    <?php
    $term_id = get_queried_object_id($current_category);
    
    if ( $val = get_field('field_name', 'category_' . $term_id) ) {
      // do stuff here if field is not empty
    }
    ?>