I have a weird situation when I am trying to use get_the_post_thumbnail_url()
in Wordpress.
To be more precise, I have this variable:
$postImage = get_the_post_thumbnail_url('article-thumbnail-image');
and it returns a blank value. If I use:
$postImage = get_the_post_thumbnail_url();
the value returned is correct but it has a different image size (150x150). Now the weird part is if I use:
the_post_thumbnail_url('article-thumbnail-image');
it shows the right value as this image size is registered in functions.php
but I need to use the GET function.
Am I doing something wrong?
$postImage = get_the_post_thumbnail_url('', 'article-thumbnail-image');
that worked. – Uxorious