How do you get the post thumbnail ?
-
This code shows Post Images in the original size, but I want to show thumbnail in 160×213 pixel that I have in images folder. How can i do this?
if( $cat_posts->have_posts() ) { while( $cat_posts->have_posts() ) : $cat_posts->the_post(); $image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_id() ), 'images_posts' ); ?> <li><a href="<?php the_permalink() ?>" ><img src="<?= $image[0] ?>" alt="<?php the_title(); ?>" width="125" height="125"/></a></li>
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How do you get the post thumbnail ?’ is closed to new replies.