Last active
August 29, 2015 14:26
-
-
Save kostiantyn-petlia/d07d9e0468417ff19e09 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php wp_get_attachment_url( get_post_thumbnail_id( $post->ID ) ); ?> | |
//or | |
<?php wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 60,60 ), false, '' ); ?> | |
//or | |
<?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 300,300 ), false, '' ); echo $src[0]; ?> | |
//and | |
get_the_post_thumbnail( $id ); // без параметра $size | |
get_the_post_thumbnail( $id, 'thumbnail' ); // маленькая миниатюра | |
get_the_post_thumbnail( $id, 'medium' ); // среднего размера | |
get_the_post_thumbnail( $id, 'large' ); // большого размера | |
get_the_post_thumbnail( $id, array(100,100) ); // произвольный размер |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment