That’s my loop:

<main id="main">

    <?php 
    // the query
    $args = array('posts_per_page' => 10 );
    $the_query = new WP_Query( $args ); 

    ?>

    <?php if ( $the_query->have_posts() ) { ?>

        <!-- loop -->

        <?php while ( $the_query->have_posts() ) {

                    $the_query->the_post(); ?>

            <div id="thumbnail">

                <?php
                if ( has_post_thumbnail() ) { the_post_thumbnail(array( "class"=>"thumbnail")); } ?>

        </div>

       <h2><a href="https://wordpress.stackexchange.com/questions/226610/<?php the_permalink();?>"><?php the_title(); ?></a></h2>

       <div class="entry">

            <?php the_excerpt(); ?>

       </div>

    <?php } } else { ?>
    <p><?php _e( 'Die Posts entsprechen leider nicht den Kriterien.' ); ?></p>
    <?php }  ?>

   <!-- end of the loop -->

   <?php wp_reset_postdata(); ?>

I want to use instead of 150x150px 200x200px but nothing works for me. Images should be crop.

Currently it looks like this: http://prnt.sc/b3v88w

I tried set_post_thumbnail_size( 200, 200 ); but any changes…

3 Answers
3

set_post_thumbnail_size() (and other API functions which add/change sizes) applies to generation while it’s active. So existing generated image sizes won’t be retroactively affected by it.

There are plenty of tools around (plugins, wp-cli) which regenerate files with current sizes configuration.

Leave a Reply

Your email address will not be published. Required fields are marked *