I am trying to add a magic fields plugin image code that will check to see if there is an image, and if so wrap the image in a div, if not, dont include the text. Any ideas? this is what I have so far but isnt working.
<?php if ( get_image('main_image',TRUE) ) {
'<div id="slideshow">'
echo get_image('main_image');
'</div>'
} else {
} ?>
Your PHP syntax is wrong. You’re mixing PHP and HTML together. Try this: