Support » Themes and Templates » Adding image captions – Portfolium theme
4 years, 10 months ago
I am using the WP Shower theme Portfolium and am stuck finding a way of including the captions in the images.
The code for the single page is:
[code moderated – please use the pastebin for code longer than 10 lines – see forum guidelines for posting code]
If anyone can help it would be much appreciated!
Make sure the photos you uploaded to your portfolio galleries have captions then open up single-portfolio.php, find the foreach statement and replace the echo line in there with:
echo wp_get_attachment_image($attachment->ID, 'full');
$caption = $attachment->post_excerpt;
echo "<p class='portfolio_caption'>$caption</p></div>";
then style .portfolio_caption