PHP conditional for custom field

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

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 3 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31076
    pbpyrojust18
    pbpyrojust18
    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 Marcinko
    Ernest Marcinko
    Keymaster

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

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.