WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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,


share|improve this question

Place global $content_width; before your code.

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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