Last active
May 18, 2017 12:06
-
-
Save marcosnakamine/c0fbe95b611908a377a8b1cc36427730 to your computer and use it in GitHub Desktop.
WordPress - Get attachment src by thumbnail ID
This file contains hidden or 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 | |
var_dump( wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ) ) ); | |
/* | |
array(4) { | |
[0]=> | |
string(81) "http://url/wp-content/uploads/2017/05/img-90x180.jpg" | |
[1]=> | |
int(90) | |
[2]=> | |
int(180) | |
[3]=> | |
bool(true) | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment