1

Currently I have this written in my functions.php:

if ( ! isset( $content_width ) )
  $content_width = 560;

If I understand correct, this should re-size a relatively large image (1024x1024px) to an image with a maximum width of 560px.

My images however are getting re-sized (to a width of 800px), but not to the specified value of 560px.

Does someone know what I might be overlooking here, could someone explain to me the use of $content_width, and where the value of 800px currently is being specified?

For what it's worth all of my values listed at options-media.php are set as when installed.

Best regards,

Jen

0

Place global $content_width; before your code.

  • Thanks both. I probably sound like a dumb :) but that is before if ( ! isset( $content_width ) ) $content_width = 560;? This as it seems to be doing nothing. At least it isn't obeying the 560px value. – Jennifer Sep 17 '12 at 17:17
  • @Jennifer are you using a theme that you downloaded, or did you build it? You said the images are being resized to 800, which makes me think your theme is setting the image sizes elsewhere. Where are you getting/seeing 800 width? Also, are you sure your theme is not setting $content_width somewhere else? – jessica Sep 17 '12 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.