If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
As these are images of websites that I have designed, I would like to link them to the website.
replace following code in template_portfolio.php
echo '<a href="'.$portfolio_image.'" rel="lightbox[portfolio]"><img class="aligncenter" src="'.$portfolio_image_small.'" alt="" /></a>';
echo '<a href="'.get_post_meta($post->ID, 'url', true).'"><img class="aligncenter" src="'.$portfolio_image_small.'" alt="" /></a>';
Then you must set post meta fields in all your portfolio posts. Call the fields “url” and type in the websites’ adresses as values.
The topic ‘Linking portfolio images to website’ is closed to new replies.