WordPress.org

Support

Support » Themes and Templates » Adding image captions – Portfolium theme

Adding image captions – Portfolium theme

  • 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

Viewing 1 replies (of 1 total)
  • 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

Viewing 1 replies (of 1 total)
  • The topic ‘Adding image captions – Portfolium theme’ is closed to new replies.