152 posts
  • Exclusive Author
  • Has been a member for 5-6 years
partnuz says

Hi

I use set_post_thumbnail_size(200,200) settings to change default thumbnail size from 150 to 200 pixels. However it seems that this function is overriden by settings from admin panel.

3256 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 more
ParkerAndKent says
partnuz said
Hi I use set_post_thumbnail_size(200,200) settings to change default thumbnail size from 150 to 200 pixels. However it seems that this function is overriden by settings from admin panel.

Did you regenerate the thumbs? When you change the sizes all the uploaded images will keep the old settings until regeneration. You can use a plugin to regenerate all your images or upload them again.

Parker

107 posts Too Much is Never Enough
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Exclusive Author
  • Bought between 1 and 9 items
  • Referred between 100 and 199 users
  • Has been a member for 3-4 years
premitheme says
ParkerAndKent said
partnuz said
Hi I use set_post_thumbnail_size(200,200) settings to change default thumbnail size from 150 to 200 pixels. However it seems that this function is overriden by settings from admin panel.

Did you regenerate the thumbs? When you change the sizes all the uploaded images will keep the old settings until regeneration. You can use a plugin to regenerate all your images or upload them again.

Parker

+1 , Ajax Thumbnail Rebuild is a great tool for this task.

152 posts
  • Exclusive Author
  • Has been a member for 5-6 years
partnuz says
ParkerAndKent said
partnuz said
Hi I use set_post_thumbnail_size(200,200) settings to change default thumbnail size from 150 to 200 pixels. However it seems that this function is overriden by settings from admin panel.

Did you regenerate the thumbs? When you change the sizes all the uploaded images will keep the old settings until regeneration. You can use a plugin to regenerate all your images or upload them again.

Parker

Yeah I’m fully aware of that. However this function still doesnt work and uses settings from admin panel.

3256 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 more
ParkerAndKent says
partnuz said
ParkerAndKent said
partnuz said
Hi I use set_post_thumbnail_size(200,200) settings to change default thumbnail size from 150 to 200 pixels. However it seems that this function is overriden by settings from admin panel.

Did you regenerate the thumbs? When you change the sizes all the uploaded images will keep the old settings until regeneration. You can use a plugin to regenerate all your images or upload them again.

Parker
Yeah I’m fully aware of that. However this function still doesnt work and uses settings from admin panel.

Now that I look better you’re using the wrong way to add image sizes.

You should use add_image_size in the right hook: http://codex.wordpress.org/Function_Reference/add_image_size

Then call the image size tag to get that size, eg: the_post_thumbnail(‘my_size_tag’);

Parker

152 posts
  • Exclusive Author
  • Has been a member for 5-6 years
partnuz says
ParkerAndKent said
partnuz said
ParkerAndKent said
partnuz said
Hi I use set_post_thumbnail_size(200,200) settings to change default thumbnail size from 150 to 200 pixels. However it seems that this function is overriden by settings from admin panel.

Did you regenerate the thumbs? When you change the sizes all the uploaded images will keep the old settings until regeneration. You can use a plugin to regenerate all your images or upload them again.

Parker
Yeah I’m fully aware of that. However this function still doesnt work and uses settings from admin panel.

Now that I look better you’re using the wrong way to add image sizes.

You should use add_image_size in the right hook: http://codex.wordpress.org/Function_Reference/add_image_size

Then call the image size tag to get that size, eg: the_post_thumbnail(‘my_size_tag’);

Parker

I dont think so. According to this part of codex this function “Set the default Post Thumbnail dimensions. To register additional image sizes for Post Thumbnails use: add_image_size(). ” so this should change default wordpress settings.

3202 posts
  • Sold between 5 000 and 10 000 dollars
  • United States
  • Bought between 10 and 49 items
  • Has been a member for 4-5 years
  • Exclusive Author
organicbee says

question whats not working… is it displaying properly on your theme? or is it not generating them on your server?

107 posts Too Much is Never Enough
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Exclusive Author
  • Bought between 1 and 9 items
  • Referred between 100 and 199 users
  • Has been a member for 3-4 years
premitheme says

And if it’s not displaying properly on your theme, what is the syntax you’re using to show them?

152 posts
  • Exclusive Author
  • Has been a member for 5-6 years
partnuz says
OrganicBeeMedia said
question whats not working… is it displaying properly on your theme? or is it not generating them on your server?

Its displaying wrong dimension instead of this specified using set_post_thumbnail_size(200,200)

However I think I found solution instead of using the_post_thumbnail(‘thumbnail’) I use the_post_thumbnail() and now everything works. Dont know if its a bug or deliberate feature.

2441 posts
  • Has been a member for 5-6 years
  • Exclusive Author
  • Europe
  • Bought between 10 and 49 items
  • Referred between 100 and 199 users
  • Sold between 100 and 1 000 dollars
  • Envato Studio (Microlancer) Beta Tester
digitalimpact says

If it had the correct width (200), but a different height than 200, then that’s WordPress’ auto cropping for you :)

by
by
by
by
by
by