Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Link image in custom filed to the post url Reply To: Link image in custom filed to the post url

#6479
Tom
Keymaster

Try this:

add_action( 'wpsp_before_title', 'tu_add_custom_meta' );
function tu_add_custom_meta() {
    $image = get_post_meta( get_the_ID(), 'cami_thumb', true );
    $permalink = get_permalink();

    if ( isset( $image ) && '' !== $image ) {
        echo '<div class="imagen-producto"><a href="' . $permalink . '"><img src="' . $image . '"></a></div>';
    }
}