516 posts
  • Super Copyright Ninja
  • Weekly Top Seller
  • Elite Author
  • Author Level 8
+8 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?

3439 posts
  • Author Level 4
  • Collector Level 2
  • Community Superstar
  • United States
+2 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

1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+2 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