This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

PHP conditional for custom field

Home Forums Product Support Forums Ajax Search Pro for WordPress Support PHP conditional for custom field

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31076
    pbpyrojust18pbpyrojust18
    Participant

    Is it possible to check if an ACF is empty or not with !empty or empty on <?php the_field('divi_overlays_id', $r->id); ?> ? Such as <?php if (!empty(the_field('divi_overlays_id', $r->id)): ?>

    https://resources-marqeta-ms.pantheonsite.io/resources/
    /wp-content/themes/Marqeta/asp/vertical.php

    #31084
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Sure, you can use any PHP code within those files, they are regular PHP files.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.