I have include PHP-Code inside a href-tag – and it doesn’t work!
<?php $image = get_post_meta($post->ID, 'image_medium', true);
if ( $image != '' ) {?>
<a href="<?php wp_get_attachment_image($image, 'category-large-thumb' ); ?>" rel="enlargeimage" rev="targetdiv:loadarea,trigger:mouseover"><?php echo wp_get_attachment_image($image, 'category-small-thumb'); ?></a>
<?php } ?>
The source code shows an empty href (href=““)
I checked it with a “direct” pathway (href=”/img.jpg”), like below, and it works
<?php $image = get_post_meta($post->ID, 'image2_medium', true);
if ( $image != '' ) {?>
<a class="fancybox" href="<?php bloginfo('template_directory');?>/1_b.jpg" rel="enlargeimage" rev="targetdiv:loadarea,trigger:mouseover"><img src="<?php bloginfo('template_directory');?>/1_s.jpg" /></a>
<?php } ?>
Where is my fault? How can I integrate the (loop-) php-code into the href-tag? Thanks Petra
