Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1417994

    Tim G
    Participant

    Hi I am using the ethos theme and the thumbnail images displayed for a list of recent posts are always 100 x 100 px.

    I have installed force regenerate thumbs and can see the sizes here. Regenerate: 100×100, 1024×1024, 1200×1200, 1200×671, 180×180, 300×300, 400×400, 550×550, 600×600, 768×768, 900×900

    I have changed the image sizes in the wordpress office under settings / media/ and Thumbnail size but the images still stay 100 x 100.

    You can see also here on the url it is 100×100 —–/wp-content/uploads/2017/03/K2A0215-100×100.jpg if I display using ‘get_the_post_thumbnail_url’

    How can I change the size of this thumbnail to say 300 x 300?

    Thanks
    Tim

    #1418143

    Joao
    Moderator

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    #1418180

    Tim G
    Participant
    This reply has been marked as private.
    #1418182

    Tim G
    Participant
    This reply has been marked as private.
    #1418650

    Paul R
    Moderator

    Hi Tim,

    It looks like those thumbnails are from a third party plugin.

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #1418776

    Tim G
    Participant
    This reply has been marked as private.
    #1418901

    Lely
    Moderator

    Hello Tim,

    When you changed the Thumbnail size on Settings > Media, did you regenerate new thumbnails? It is important regenerate the thumbnails after you have changes the image dimensions for the thumbnail. No need to add custom function.

    #1419595

    Tim G
    Participant

    Hi Lely,

    Yes I did regenerate the thumbs and still get the 100×100 thumb generated?

    Thanks
    Tim

    #1419914

    Rue Nel
    Moderator

    Hello Tim,

    I have spent some time in your site trying to figure out the problem. It turns out that you have added a custom code to change the post navigation and add some images into the links. You were using the default get_the_post_thumbnail() function which is by default take advantage of the default size of WordPress post-thumbnail which is only 100×100. If you want to use the setting from the media, you will need to change your code and have this instead:

    // Entry Navigation
    // =============================================================================
    
      function x_entry_navigation() {
    
      $stack = x_get_stack();
    	  
    ?>
    
      <div class="x-nav-articles-large">
     
    	<?php previous_post_link( '%link', 'Previous post in category', TRUE, ' ', 'post_format' ); ?>
    <div class="float-left"><?php
            $prevPost = get_previous_post();
            $prevthumbnail = get_the_post_thumbnail($prevPost->ID, 'thumbnail');
    	  previous_post_link('<div class="pre-heading">Previous</div>');
            previous_post_link('%link',''.$prevthumbnail.'' );
    	   previous_post_link( '<div class="pre-link">%link</div>' );
    ?>  </div>
    
       
        
        <div class="float-right">
           <?php
            $nextPost = get_next_post();
            $nextthumbnail = get_the_post_thumbnail($nextPost->ID, 'thumbnail');
    	  previous_post_link('<div class="nxt-heading">Next</div>');
            next_post_link('%link',''.$nextthumbnail.'');
     next_post_link( '<div class="nxt-link">%link</div>' );
    	  
    ?>  </div>
        
        
    
        
    
      </div>
    
      <?php
    
      }
    // -- New plugin karl taylor phtography video course pages --//

    I added thumbnail as the image size to be displayed. The default image sizes of WordPress are “thumbnail”, “medium”, “large” and “full” (the size of the image you uploaded). These image sizes can be configured in the WordPress Administration Media panel under Settings > Media. Themes may also add “post-thumbnail” which maybe 100×100 in general.

    And now, a bigger picture is displaying in your custom side of the single photography course template.

    As for your reference, I modified your code in a way to display a different image dimension. So I ended up to check the codex as my guide to know the full potential of the get_the_post_thumbnail() function which can be found here: https://developer.wordpress.org/reference/functions/get_the_post_thumbnail/

    If you need anything else, please let us know.

    #1420168

    Tim G
    Participant

    That’s great thanks for all your help 🙂

    #1420169

    Thai
    Moderator

    If you need anything else please let us know.