Title: Tiled gallery width
Last modified: August 22, 2016

---

# Tiled gallery width

 *  Resolved [Renssmit](https://wordpress.org/support/users/renssmit/)
 * (@renssmit)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/tiled-gallery-width/)
 * Hi, I’me using jetpack for it’s sidebar gallery but I really have issues with
   it. I can’t show my WordPress because I’me working on my localhost. The problem
   is the width of the gallery, the standard solution I found on the forums doesn’t
   work for me. [http://codex.wordpress.org/Content_Width](http://codex.wordpress.org/Content_Width)
   it doesn’t change anything for my theme [The Newswire](http://thenewswire.co.nz/).
   Here is a screenshot of my problem:
 * [http://i60.tinypic.com/2h403dw.png](http://i60.tinypic.com/2h403dw.png)
 * I want the gallery to have a 100% width of my sidebar. If you need my wordpress
   I can send a .zip just let me know 🙂
 * Thanks in advance!
 * [https://wordpress.org/plugins/jetpack/](https://wordpress.org/plugins/jetpack/)

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

 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [11 years, 5 months ago](https://wordpress.org/support/topic/tiled-gallery-width/#post-5531218)
 * It seems that your theme already include a `$content_width` setting:
    [https://themes.trac.wordpress.org/browser/the-newswire/1.0.7/functions.php#L71](https://themes.trac.wordpress.org/browser/the-newswire/1.0.7/functions.php#L71)
 * Could you check that your theme is up to date and includes that code?
 * You might also want to change that value there if you’d edited the theme to have
   a larger content area.
 * Let me know how it goes.
 *  Thread Starter [Renssmit](https://wordpress.org/support/users/renssmit/)
 * (@renssmit)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/tiled-gallery-width/#post-5531219)
 * Already checked that out, changing this value doesn’t fix it :/
 *     ```
       /**
        * Set the content width based on the theme's design and stylesheet.
        */
       if ( ! function_exists( 'newswire_content_width' ) ) :
       	function newswire_content_width() {
       		global $content_width;
       		if (!isset($content_width))
       			$content_width = 640; /* pixels */
       	}
       endif;
       add_action( 'after_setup_theme', 'newswire_content_width' );
       ```
   
 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [11 years, 5 months ago](https://wordpress.org/support/topic/tiled-gallery-width/#post-5531223)
 * Could you try to install this small plugin, and change the custom width value
   by going to Settings > Media?
    [https://wordpress.org/plugins/custom-content-width/](https://wordpress.org/plugins/custom-content-width/)
 * Let me know how that goes.
 *  Thread Starter [Renssmit](https://wordpress.org/support/users/renssmit/)
 * (@renssmit)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/tiled-gallery-width/#post-5531231)
 * Doesn’t change anything :/
 * I looked in the inspect element in Google Chrome this is what I see:
 * class: tiled-gallery type-rectangular = width: 474px
    class: gallery row = width:
   265px
 * I don’t know if this has something to do with it but gallery row should be 100%
   so that would be 474 px.
 * Would it be easier to help if you can see my WordPress website?
 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [11 years, 5 months ago](https://wordpress.org/support/topic/tiled-gallery-width/#post-5531232)
 * > Would it be easier to help if you can see my WordPress website?
 * Yes, it would, thanks! Could you post a link to your gallery here so I can take
   a look?
 * If you want your site URL to remain private, you can also contact us via this
   contact form:
    [http://jetpack.me/contact-support/](http://jetpack.me/contact-support/)
 *  Thread Starter [Renssmit](https://wordpress.org/support/users/renssmit/)
 * (@renssmit)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/tiled-gallery-width/#post-5531405)
 * You can find the website online here now: [http://renssmit.be/knokkeyachtswp/](http://renssmit.be/knokkeyachtswp/)
 * Thanks in advance!
 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [11 years, 5 months ago](https://wordpress.org/support/topic/tiled-gallery-width/#post-5531416)
 * Thank you!
 * Since the gallery is added to one of your sidebars, the `$content_width` value
   won’t help here. You’ll need to overwrite the width value of the Gallery widget
   instead. Something like this should do the trick:
 *     ```
       function jeherve_custom_gallery_widget_width( $args, $instance ) {
               return '477';
       }
       add_filter( 'gallery_widget_content_width', 'jeherve_custom_gallery_widget_width', 10, 3 );
       ```
   
 *  Thread Starter [Renssmit](https://wordpress.org/support/users/renssmit/)
 * (@renssmit)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/tiled-gallery-width/#post-5531417)
 * Hello thanks for the help but where I have to put this code? In my functions.
   php?
 * #edit: This works for me if I put it in functions.php, many thanks 😀
 * This thread is resolved.
 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [11 years, 5 months ago](https://wordpress.org/support/topic/tiled-gallery-width/#post-5531418)
 * Yes, your theme’s functions.php is a good place to paste that code.
 * You could also place it in a [functionality plugin](https://wordpress.org/plugins/functionality/).
 *  [Lobsterdm](https://wordpress.org/support/users/lobsterdm/)
 * (@lobsterdm)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/tiled-gallery-width/#post-5531520)
 * That’s an excellent fix – had exactly the same problem. Thanks for posting it.

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

The topic ‘Tiled gallery width’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

## Tags

 * [gallery](https://wordpress.org/support/topic-tag/gallery/)
 * [jetpack plugin](https://wordpress.org/support/topic-tag/jetpack-plugin/)
 * [Tile](https://wordpress.org/support/topic-tag/tile/)
 * [width](https://wordpress.org/support/topic-tag/width/)

 * 10 replies
 * 3 participants
 * Last reply from: [Lobsterdm](https://wordpress.org/support/users/lobsterdm/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/tiled-gallery-width/#post-5531520)
 * Status: resolved