Always seems to work
-
I also got it to work with featured images with a link:
<?php if ( has_post_thumbnail()) { $custom_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full'); echo '<a href="' . $custom_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" data-rel="lightbox" >'; the_post_thumbnail('folio-featured-image' ); echo '</a>'; } else { echo '<img src="' . get_bloginfo( 'template_directory' ) . '/images/default-image.jpg" />'; } ?>
The topic ‘Always seems to work’ is closed to new replies.