@Itsu me几乎正确。这些参数必须分别为2nd resp。第三个参数,不是第一个:
$attr = array(
\'title\' => \'howdy partner\',
\'alt\' => \'a nice view of the ocean\',
);
// pick one, note 2 or 3 arguments:
the_post_thumbnail( \'post-thumbnail\', $attr );
echo("<a href=\'$p->permalink\'>". // null for current $post->ID (use within loop)
get_the_post_thumbnail( null, \'post-thumbnail\', $attr ).
"</a>");