[Plugin: Magic Fields] – If Field Is Empty – Don’t Show It!
-
Hi there,
I’m using the Magic Fields plugin and I was wondering how I can do PHP and make sure, if the field is empty, not to show it.
Right now, in Internet Explorer, it’s showing a box with a red X in it for my images, and some Testimonials don’t have images in right now.
Here’s my code for displaying my fields as a group:
<?php $alltestimonials = get_group('testimonials'); foreach($alltestimonials as $testimonials) { echo "<blockquote><cite>"; echo $testimonials['person_location'][1]."</cite>"; echo "<img class='aligncenter' src=' " .$testimonials['testimonial_photo'][1]['t']. " '>"; echo $testimonials['preview_snippet'][1]."<div class='toggle'>"; echo $testimonials['rest_of_testimonial'][1]."</div>"; echo "</blockquote>"; } ?>
Is it something like
if(!empty
? That’s all I know lol…I appreciate any help ??
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘[Plugin: Magic Fields] – If Field Is Empty – Don’t Show It!’ is closed to new replies.