Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2743

    As these are images of websites that I have designed, I would like to link them to the website.

    #39116

    Hey,

    replace following code in template_portfolio.php

    echo '<a href="'.$portfolio_image.'" rel="lightbox[portfolio]"><img class="aligncenter" src="'.$portfolio_image_small.'" alt="" /></a>';

    with:

    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.

    #39117

    Works beautifully. Thank you for your help…..

    #39118

    Glad that I could help you.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Linking portfolio images to website’ is closed to new replies.