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

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



    replace following code in template_portfolio.php

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


    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.


    Works beautifully. Thank you for your help…..


    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.