vendredi 30 janvier 2015

Wordpress - How can I hide the_meta output if it is empty?


Vote count:

0




I've created a function and hook to insert some custom field information on some of my posts.



<?php the_meta(); ?>


I have added some CSS formatting (box with background) for display. Problem: if I have a post without any custom fields defined it displays an empty box. How can I prevent it from outputting the empty if there is nothing to display? All I can find is information on specific field types and and can't extrapolate from it. I'm definitely not a php boss.



asked 2 mins ago







Wordpress - How can I hide the_meta output if it is empty?

Aucun commentaire:

Enregistrer un commentaire