433 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 2 years
+6 more
Jaynesh says

Hello,

I’ve been soft rejected due to not correctly setting $content_width (and a few other issues).

But this content_width thing is bugging me the most..

How would the $content_width be set on a responsive design where the width will differ depending on the browser size?

How would the $content_width be set on a theme when the user can set their own width for each individual post?

3229 posts
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
  • Has been part of the Envato Community for over 4 years
+1 more
organicbee says

How would the $content_width be set on a responsive design where the width will differ depending on the browser size?

Max width

How would the $content_width be set on a theme when the user can set their own width for each individual post?

You can set the content with based on the size/option of a post

1476 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+3 more
OriginalEXE says

Regarding responsive design, you can’t do much about it, but you can make embedds responsive, right? So I would say, set the content_width to the (max) size viewed on desktop.

Regarding individual post size, you could do it with a simple is_single check. Then, if it is a single post, get_post_meta to retrieve user defined post width and then define content_width appropriately.

http://codex.wordpress.org/Content_Width
by
by
by
by
by
by