Get the URL of medium thumbnail size
-
Hi everybody,
I try to get the URL of the medium thumbnail size in a loop. I searched and found a lot things. But nothing works ??
Here are some codes I tried:
<?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'medium' ); $url = $thumb['0']; ?>
<?php $image_id = get_post_thumbnail_id(); $image_url = wp_get_attachment_image_src($image_id,'medium'); $image_url = $image_url[0]; ?>
<?php function wp_get_attachment_medium_url($id){ $medium_array = image_downsize( $id, 'medium' ); $medium_path = $medium_array[0]; return $medium_path; } ?>
All of them have an empty result. There is no error.
Does anyone has an idea what I can do?
Greetings,
Raisis
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Get the URL of medium thumbnail size’ is closed to new replies.