Custom Field Template not calling images in PHP
-
Obviously I’m doing something wrong here, but can’t figure out the solution. I’m attempting to use CFT in a CMS for a portfolio site, calling thumbnail images that link to the full portfolio image in lightbox. Here’s the code I have:
<?php if(get_post_meta($post->ID, "portfolio_image", true)) { ?> <a href="<?php echo get_post_meta($post->ID, "portfolio_image", true); ?>" rel="lightbox[<?php the_ID(); ?>]"> <img src="<?php if(get_post_meta($post->ID, "portfolio_thumbnail", true)) { ?><?php echo get_post_meta($post->ID, "portfolio_thumbnail", true); ?><?php } ?>" title="<?php the_title(); ?>" alt="<?php the_title(); ?>"> </a> <?php } ?>
Instead of getting an image, I’m only getting the alt for the link and the lightbox just spins. I know that the images have been uploaded through CFT, so they’re definitely there, but I also realize I’m not calling them up correctly.
Would appreciate any help I could get.
https://www.ads-software.com/extend/plugins/custom-field-template/
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Custom Field Template not calling images in PHP’ is closed to new replies.