Problem with echo
-
I have problem with echo.
This code:<?php if ( get_post_meta($post->ID, 'price', true) ) { echo '<a href="'.get_post_meta($post->ID, 'price', true).'">'.the_post_thumbnail('slider')."</a>"; } else { echo the_post_thumbnail('slider'); } ?>generate :
<img width="730" height="280" src="http://localhost/wordpress/wp-content/uploads/2011/04/reel_1.jpg" class="attachment-slider wp-post-image" alt="reel_1" title="reel_1" /><a href="http://localhost/wordpress/portfolios/project-1/"></a>but should:
<a href="http://localhost/wordpress/portfolios/project-1/"><img width="730" height="280" src="http://localhost/wordpress/wp-content/uploads/2011/04/reel_1.jpg" class="attachment-slider wp-post-image" alt="reel_1" title="reel_1" /></a>Please help, thx.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Problem with echo’ is closed to new replies.