get_the_post_thumbnail_url('full') returns empty from custom post type
I'm trying to display the full size image of the single post from a custom post type that I created, below is what I've tried
?php
$args = array(
'post_type' = 'press',
'order' = 'ASC',
'post_status' = 'publish',
'suppress_filters' = false
);
$press = new WP_Query( $args );
if ( $press-have_posts() ) { ?
?php while ( $press-have_posts() ) : $press-the_post(); ?
div class="col-sm-4 mb24"
article class="post-article bg-white"
div class="article-img"
?php
if( has_post_thumbnail() ){
?
div class="img-box position-relative overflow-hidden"
a href="?php the_permalink(); ?" class="height300 bg-graylight flex-center c-dark position-relative"
img src="?php echo get_the_post_thumbnail_url('full'); ?" alt="?php the_title(); ?"
/a
/div
?php } else { ?
a href="?php the_permalink(); ?" class="height300 bg-graylight flex-center c-dark position-relative"
i class="ti-image font64"/i
/a
?php } ?
/div
/article
/div
?php endwhile; ?
?php } ?
/div
/div
/section
but seems this
get_the_post_thumbnail_url('full')
not working because it shows nothing e.g. src=""
but if I do
get_the_post_thumbnail_url()
surely gives me the image url but not the full size one. Any help, ideas please?
Topic thumbnails post-type post-thumbnails custom-post-types Wordpress
Category Web