469 posts
  • Helped several times protecting Envato Market against copyright violations
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Sells items exclusively on Envato Market
+7 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?

3436 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

1509 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
+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

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by