Tagged: x
-
AuthorPosts
-
March 23, 2017 at 12:44 pm #1417994
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
TimMarch 23, 2017 at 3:07 pm #1418143Thanks 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.
March 23, 2017 at 3:41 pm #1418180This reply has been marked as private.March 23, 2017 at 3:43 pm #1418182This reply has been marked as private.March 24, 2017 at 12:46 am #1418650Hi 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 credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
March 24, 2017 at 4:18 am #1418776This reply has been marked as private.March 24, 2017 at 7:28 am #1418901Hello 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.
March 24, 2017 at 5:14 pm #1419595Hi Lely,
Yes I did regenerate the thumbs and still get the 100×100 thumb generated?
Thanks
TimMarch 25, 2017 at 2:59 am #1419914Hello 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.
March 25, 2017 at 12:40 pm #1420168That’s great thanks for all your help 🙂
March 25, 2017 at 12:41 pm #1420169If you need anything else please let us know.
-
AuthorPosts