我正在尝试制作一个模板,其中:
if(no_feature == 1) {
TEXT (displayed on the left side), IMAGE (displayed on the right side)
} else {
IMAGE (displayed on the left side), TEXT (displayed on the right side)
}
到目前为止,这是我的代码:
<div class="post-content">
<?php if ($this->get_field('no_feature')== 1);?>
<div class="one_half">
<?php echo "TEXT";?>
</div>
<div class="one_half last">
<?php echo "Image";?>
</div>
<?php else:?>
<div class="one_half">
<?php echo "Image";?>
</div>
<div class="one_half last">
<?php echo "Text";?>
</div>
<?php endif; ?>
</div>