If customfield is empty hide my button
-
Hello,
Inside my loop, I’d like to hide (or not call) a button (or a text) if the customfield is empty.
Here is my code :
<div class="blog-text"><?php the_content(); ?> <span class="rsTmb">fr</span> </div> <div class="blog-text"><?php echo get_post_meta($post->ID, 'anglais', true); ?> <span class="rsTmb">en</span> </div> <div class="blog-text"><?php echo get_post_meta($post->ID, 'espagnol', true); ?> <span class="rsTmb">es</span> </div>
Thank you !
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘If customfield is empty hide my button’ is closed to new replies.