2
我試圖做一個模板,其中:PHP交流內容
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>
而你的問題是什麼? – arkascha
獲取任何錯誤? – vijaykumar
你的'if()'子句是空的。這是你的問題嗎? –