Title: [Plugin: Theme-Check] $GLOBALS[&#039;content_width&#039;] not recognized
Last modified: August 20, 2016

---

# [Plugin: Theme-Check] $GLOBALS['content_width'] not recognized

 *  [fuxia](https://wordpress.org/support/users/thefuxia/)
 * (@thefuxia)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-theme-check-globalscontent_width-not-recognized/)
 * `$GLOBALS['content_width'] = 750;` in a theme produces the false error:
 * > REQUIRED: No content width has been defined.
 * Fix: run a `preg_match()` on
 * `'~\$GLOBALS\[\s*([\'"])content_width\\1\s*\]~'`
 * I write global variables always in the long form to make them stand out and because
   they are treated slightly different than `global $var; $var = 'something';`.
 * [http://wordpress.org/extend/plugins/theme-check/](http://wordpress.org/extend/plugins/theme-check/)

Viewing 1 replies (of 1 total)

 *  [Robert Chapin](https://wordpress.org/support/users/miqrogroove/)
 * (@miqrogroove)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-theme-check-globalscontent_width-not-recognized/#post-3029664)
 * Me too.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Theme-Check] $GLOBALS['content_width'] not recognized’ 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: [Robert Chapin](https://wordpress.org/support/users/miqrogroove/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-theme-check-globalscontent_width-not-recognized/#post-3029664)
 * Status: not resolved