title: How to resize image excerpt without cropping it in wordpress?
body: <p>Basically I've helped someone set up his website a bit with a theme he bought on themeforest. What he wants now is a little over my head though. On this page:</p>
  
  <p><a href="http://www.richardpennington.com/blog/" rel="nofollow noreferrer">http://www.richardpennington.com/blog/</a></p>
  
  <p>The images are shown in a smaller (cropped) version with an excerpt of the text, the code I can find looks like this:</p>
  
  <pre><code>if ( !function_exists( 'writer_ancora_template_excerpt_theme_setup' ) ) {
      add_action( 'writer_ancora_action_before_init_theme', 'writer_ancora_template_excerpt_theme_setup', 1 );
      function writer_ancora_template_excerpt_theme_setup() {
          writer_ancora_add_template(array(
              'layout' =&gt; 'excerpt',
              'mode'   =&gt; 'blog',
              'need_terms' =&gt; true,
              'title'  =&gt; esc_html__('Excerpt', 'writer-ancora'),
              'thumb_title'  =&gt; esc_html__('Large  image (crop)', 'writer-ancora'),
              'w'      =&gt; 300,
        'h'    =&gt; 500
          ));
      }
  }
  </code></pre>
  
  <p>I"ve upped the values on 'w' and 'h'  a bit because he wants the images to be shown fully but he wants them to be smaller without them being cropped and I honestly have no clue at all on how to do so. Also not sure how to edit the theme function. The thene's support can't help me either.</p>
  
  <p>The problem is that he posts both landscape and portrait photos making a cropped setting quite weird. Thanks if you can help me.</p>