php - If No Value is given to field, this total <tr> should hide -


i trying alter table in wordpress template.

<tr>   <td><?php the_field('flipkart_price'); ?></td> </tr> 

if no value given flipkart_price , total tr should hide. need small php line this.

use below code field

<?php if( get_field('flipkart_price') ): ?>     <tr><td><?php the_field('flipkart_price'); ?></td></tr> <?php endif; ?> 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -