Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $imageUrl = "";
- if (has_post_thumbnail( get_the_ID() ) ){
- $image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'medium' );
- $imageUrl = $image[0];
- }
- else {
- $imageUrl = get_template_directory_uri()."/img/placeholder.png";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement