Forum Replies Created

Viewing 1 replies (of 1 total)
  • Hi, I am having a similar issue as Asitis, but my code is different. I too am displaying an image from the custom fields, and wish to not display it if the image was not inserted in the custom field (as some posts simply don’t go with an image). This is my code:

    <a rel="lightbox[hemingway_block]" href="<?php $values = get_post_custom_values("image07urlLarge"); echo $values[0]; ?>"><img class="imgblock" src="<?php $values = get_post_custom_values("image07urlThumb"); echo $values[0]; ?>" alt="<?php the_title(); ?>" /></a>

    What code could I use to hide the image if there is no data in the ‘image07urlLarge’ custom field?

    Thanks!

Viewing 1 replies (of 1 total)