get_the_post_thumbnail wordpress 3.5

I could be mistaken, but I don’t think $post->post_id works to retrieve the post’s ID. I believe you want $post->ID. So that was probably your issue to begin with, though without seeing your $attr array, it’s hard to say. Here’s a reference for $post‘s properties. In this case, get_the_post_thumbnail is the more appropriate function.

In your answer you posted for yourself, you’re using the_post_thumbnail incorrectly. First off, you don’t need to echo it; the_post_thumbnail will output the thumbnail. Side note: Any function in WordPress that starts with the_ is almost always going to output something automatically. Second, You don’t need to pass it $post->ID (again, using the wrong property). Third, the first property of the_post_thumbnail is the size, e.g. “thumbnail”.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)