Support » Themes and Templates » [Resolved] How to get the link to original img in a get_post_meta img
5 years, 1 month ago
I have this problem that have me stop on this new theme I´m creating for a client.
It is about this code:
<a href="#" class="producto" ><img src="<?php echo get_post_meta($post->ID, 'A-imagen-producto', true); ?>" width=300 height=224 alt="Producto" /></a>
I need to have a link to the original image, so when the user click on the small image it takes to the big one.
Maybe there is better ways to do it so please share your thougts!.
In front of me eyes!,
The solution was simple, just adding the same query in the href like this:
ID, ‘A-imagen-producto’, true); ?>” class=”producto” ><img src=”<?php echo get_post_meta($post->ID, ‘A-imagen-producto’, true); ?>” width=300 height=224 alt=”Producto” />