I have to put a condition on this function:
<div class=imagen01>
<?php sacconicase_post_thumbnail();?>
<div class="mostrasconto"><?php echo (" "),"-", get_the_author_meta('discount', $post->post_author ),"%" ;?></div></div>
I have to set the following: IF "get_the_author_meta" is empty, dont echo BUT dont show neither the whoole div.mostrasconto. I have to hide this div because there is a background via css
Which is the best solution?
2
Answers
I found a solution with the following
Put an
if
statement around it.