Skip to content

Instantly share code, notes, and snippets.

@alandbh
Created February 26, 2016 19:49
Show Gist options
  • Save alandbh/5dbccdfb07484723a0e5 to your computer and use it in GitHub Desktop.
Save alandbh/5dbccdfb07484723a0e5 to your computer and use it in GitHub Desktop.
Imprime um thumbnail no tema e coloca uma classe específica no elemento <img>. Ex.: "img-responsive" ou "alignleft"
// se for um post
echo get_the_post_thumbnail( $post_id, 'thumbnail', array( 'class' => 'alignleft' ) );
//Se for uma página
echo get_the_post_thumbnail( $page->ID, 'full', array( 'class' => 'img-responsive' ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment