Title: $content_width ??
Last modified: August 21, 2016

---

# $content_width ??

 *  [olddocks](https://wordpress.org/support/users/olddocks/)
 * (@olddocks)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/content_width-1/)
 * What exactly does this do? it seems all themes require to set this variable like
   this
 *     ```
       if ( ! isset( $content_width ) )
       	$content_width = 600;
       ```
   
 * I am creating a theme, where in the options panel, people can disable sidebar.
   If the sidebar is off, the theme shows posts and pages full width (1000px) else
   700px with sidebar.
 * How do i set $content_width accordingly to this?

Viewing 1 replies (of 1 total)

 *  Moderator [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * (@jcastaneda)
 * THEME COFFEE MONKEY
 * [12 years, 3 months ago](https://wordpress.org/support/topic/content_width-1/#post-4590736)
 * That variable is used in Distraction Free Writing mode. I believe it is also 
   for media related usage. If you check out how 2013 and 2014 change that it may
   help you out a little.

Viewing 1 replies (of 1 total)

The topic ‘$content_width ??’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/content_width-1/#post-4590736)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
