Title: Setting content width
Last modified: August 30, 2016

---

# Setting content width

 *  Resolved [stephencottontail](https://wordpress.org/support/users/stephencottontail/)
 * (@stephencottontail)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/setting-content-width/)
 * Underscores uses this code to set `$content_width`:
 *     ```
       function _s_content_width() {
       	$GLOBALS['content_width'] = apply_filters( '_s_content_width', 640 );
       }
       add_action( 'after_setup_theme', '_s_content_width', 0 );
       ```
   
 * which causes this error:
 * “REQUIRED: No content width has been defined. Example: (code snipped)”
 * Is Underscores setting `$content_width` appropriately? I haven’t submitted a 
   theme for consideration since this code was added to Underscores, so I’m not 
   sure if this would affect the review or not.
 * [https://wordpress.org/plugins/theme-check/](https://wordpress.org/plugins/theme-check/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [10 years, 10 months ago](https://wordpress.org/support/topic/setting-content-width/#post-6371851)
 * This issue was fixed in Theme Check already, and that particular fix is live 
   on the WordPress.org version of theme-check.
 * [https://github.com/Otto42/theme-check/pull/58](https://github.com/Otto42/theme-check/pull/58)
 * A new release of the plugin version has not been made available yet, but likely
   will be with the release of 4.3.

Viewing 1 replies (of 1 total)

The topic ‘Setting content width’ is closed to new replies.

 * ![](https://ps.w.org/theme-check/assets/icon-128x128.png?rev=972579)
 * [Theme Check](https://wordpress.org/plugins/theme-check/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/theme-check/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/theme-check/)
 * [Active Topics](https://wordpress.org/support/plugin/theme-check/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/theme-check/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/theme-check/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/setting-content-width/#post-6371851)
 * Status: resolved