WordPress.org

Ready to get started?Download WordPress

Forums

Adding image captions - Portfolium theme (2 posts)

  1. helelizwil
    Member
    Posted 2 years ago #

    Hi,

    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,

    Helen

  2. samrhein
    Member
    Posted 2 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