Title: Defining content width
Last modified: February 17, 2017

---

# Defining content width

 *  [Ken Gagne](https://wordpress.org/support/users/kgagne/)
 * (@kgagne)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/defining-content-width/)
 * I used Jetpack to apply some custom CSS to the Twenty Seventeen theme to [move the sidebar](https://www.designbombs.com/master-twenty-seventeen-wordpress-theme/)
   and [expand the main body’s width](https://wordpress.org/support/topic/twenty-seventeen-how-to-get-sidebar-on-pages/).
   However, YouTube videos were still oEmbedding at the default width of 525 pixels.
   So I created a child theme and added this line to the functions.php file:
 * `if ( ! isset( $content_width ) ) $content_width = 900;`
 * But that didn’t work. The only thing that did was changing line 59 in the parent
   theme’s function.php:
 * `$GLOBALS['content_width'] = 900;`
 * Of course, that defeats the entire point of having a child theme. What’s the 
   proper way to accomplish what I’m trying to do?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [salsaturation](https://wordpress.org/support/users/salsaturation/)
 * (@salsaturation)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/defining-content-width/#post-8817487)
 * Hi kgagne
 * Did you try something like this in your child theme functions.php?
 *     ```
       if ( ! isset( $content_width ) ) {
       	$content_width = 900;
       }
       ```
   
 *  Thread Starter [Ken Gagne](https://wordpress.org/support/users/kgagne/)
 * (@kgagne)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/defining-content-width/#post-8817590)
 * Hi, Sal — thanks for the suggestion. Except for the curly braces, that’s the 
   same code I posted in my original message. Just to be sure, though, I did try
   it again, and it still didn’t work. 🙁

Viewing 2 replies - 1 through 2 (of 2 total)

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

 * ![](https://i0.wp.com/themes.svn.wordpress.org/twentyseventeen/4.0/screenshot.
   png)
 * Twenty Seventeen
 * [Support Threads](https://wordpress.org/support/theme/twentyseventeen/)
 * [Active Topics](https://wordpress.org/support/theme/twentyseventeen/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/twentyseventeen/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/twentyseventeen/reviews/)

## Tags

 * [content width](https://wordpress.org/support/topic-tag/content-width/)
 * [oEmbed](https://wordpress.org/support/topic-tag/oembed/)

 * 2 replies
 * 2 participants
 * Last reply from: [Ken Gagne](https://wordpress.org/support/users/kgagne/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/defining-content-width/#post-8817590)
 * Status: not resolved