The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Adding image captions - Portfolium theme (2 posts)

  1. helelizwil
    Posted 4 years 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!

    Many thanks,


  2. samrhein
    Posted 4 years ago #

    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 "<div>";
    echo wp_get_attachment_image($attachment->ID, 'full');
    $caption = $attachment->post_excerpt;
    echo "<p class='portfolio_caption'>$caption</p></div>";

    then style .portfolio_caption

Topic Closed

This topic has been closed to new replies.

About this Topic