Reputation: 1
I have migrated my wordpress blog to another server and now I find a problem ...
Some functions do not work.
For example the function of showing the thumbnail of each posts or category listing.
No errors, just does not show anything in the html code.
Example:
<?php the_post_thumbnail ();>
Output = ""
Upvotes: 0
Views: 55
Reputation: 499
Use This code
if ( have_posts() ) :
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID) );
$url = $thumb['0'];
endif;
<img src="<?php echo $url;?>"/>
Upvotes: 1