Hi.
<?php if( get_field('divergence', 10681) ): ?>
<div>Some text</div>
<?php elseif; ?>
<div>Some alternative text</div>
<?php endif; ?>
In
<?php elseif; ?>
It should be
<?php else: ?> (notice the “:”)
A elseif, requires a new condition, like
<?php if( get_field('divergence', 10681) ): ?>
<div>Some text</div>
<?php elseif( get_field('otherfield', 10681) ): ?>
<div>Some otherfield text</div>
<?php else: ?>
<div>Some alternative text</div>
<?php endif; ?>
-
This reply was modified 4 years, 1 month ago by tagrelos.
-
This reply was modified 4 years, 1 month ago by tagrelos.