Support » Plugin: Custom Content Shortcode » check if ACF related field is empty

  • Hey there,

    I am trying to check if a [related name] is in fact empty (so I wouldn’t print the header) but [if empty] is not working. Can you help out?

    Generally: What kind of code can I use in combination with fields like repeater or related? I assumed all loop-parameters would work but that does not seem to be true.

    Thanks for any help!


Viewing 1 replies (of 1 total)
  • Not exactly what you’re looking for, but this is what I got to work for me:

    <h2>Related Offers, Articles & Itineraries</h2>
    	[if exists]
    		[related type=offer taxonomy=tag,destination,interest]
    			[-if field=end_date value=future]
    				<li>[field title-link]</li>
    		[related type=post,sample-itinerary taxonomy=tag,destination,interest]
    			<li>[field title-link]</li>
    		<li>Nothing found</li>
Viewing 1 replies (of 1 total)
  • The topic ‘check if ACF related field is empty’ is closed to new replies.