Feature image thumbnail size

Posted in: Newspaper
Post count: 2

My WordPress is installed at https://example.com/news/, I would like to display the latest posts at https://example.com/. Why is the size of each feature image thumbnail different? I have set the thumbnail image size to 320 * 240 in setting – > media > – thumbnail size

My code is as follows.
<?php
define(‘WP_USE_THEMES’, false);
require(‘news/wp-load.php’);
?>
<?php
query_posts(‘showposts=10’);
while (have_posts()): the_post();
?>
<div class=”blog_item”>
<div class=”summary”>
<p class=”blog_title”>“><?php echo mb_strimwidth(strip_tags(apply_filters(‘the_title’, $post->post_title)), 0, 200,” “); ?></p>
<div class=”blog_stats”>
<span><i class=”fa fa-user”></i><b class=”text”>Posted By:</b> <b class=”hl”><?php the_author(); ?></b></span>
<span><i class=”fa fa-clock-o”></i><b class=”text”>Published:</b> <b class=”hl”><?php the_time(‘Y-m-d’); ?> </b></span>
<span><i class=”fa fa-eye”></i><b class=”text”>Times Read:</b> <b class=”hl”>149</b></span>
<span><i class=”fa fa-comments”></i><b class=”text”>Comments</b> <b class=”hl”><?php comments_number(‘0′,’1′,’%’) ?></b></span>
</div>
<div class=”image”>“>
<?php the_post_thumbnail(‘thumbnail’); ?>

Here is the screenshot https://snipboard.io/LfSZ0y.jpg

I’m trying to find out at Google. Some posts say it’s related to the theme you use

Post count: 18283

Hello !

Please make sure that your photos keep their aspect ratio. I personally recommend using 800×600 image size.

Thank you !

Post count: 2

Hi
I have change the featured image to 800×600, but on the homepage, it is display a 307×230 image, how to make it display a 320×240 image.

I have add this code to add_image_size( ‘custom-size’, 320, 240, true ); to functions.php.

the 320×240 image exists in the uploads folder

Post count: 18283

Hello !

Please provide a link to your website.

Thank you !

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.