Home>Support>Gallery widget not working as expected

Gallery widget not working as expected

I am using the gallery widget but it will not show full width. it stubbornly sticks to 2 column of images.
The galley widget works as expected in the wordpress block editor. But I am using the your pagebuilder.
Is there some way to make this full width within siteorigin layout so that I can make it centered and add padding etc to make it look nice.

Here is my gallery page. Thanks in advance for any help.
https://www.pixelfix.co.nz/colourized-gallery.html

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 2 years, 10 months ago Andrew Misplon
    Hi, I Work Here

    Hi, thanks for reaching out.

    To center the Jetpack Tiled Gallery, you can try adding the following at AppearanceCustom CSS if you’re using SiteOrigin CSS or CustomizeAdditional CSS:

    .tiled-gallery .gallery-row {
        margin: 0 auto;
    }

    Jetpack sets the gallery width based on the theme’s content width value of 650. You can try the following plugin to change the site content width: https://wordpress.org/plugins/custom-content-width/. Download the ZIP file and then install from PluginsAdd NewUpload Plugin. The plugin provides a field to change the content width value.

  2. 2 years, 10 months ago Pixelshaw

    Hi Andrew,

    Many thanks for your help. The centering worked great. Thank you.

    I am a little confused by the width advise you gave. Which theme are you referring too? I am using the site origin North theme. Can I not edit the content width through CSS??

    Also the gallery widget works as full width using the Guttenberg block editor without any additional plugin. So how come I need a plugin when using the Siteorigin builder?

    Thank in advance.

  3. 2 years, 10 months ago Andrew Misplon
    Hi, I Work Here

    Hi, thanks for the update. I’m glad to hear you’re making progress.

    The widget in use is the core WordPress Gallery Widget. The Gallery Widget sets its width using each theme’s declared content width value. You can view that value for North at the following URL: https://github.com/siteorigin/siteorigin-north/blob/develop/functions.php#L146. The core WordPress Gallery Widget uses this method for all themes. The plugin mentioned above is a method of changing the $content_width. If you’re using a child theme or the Code Snippets plugin, we could also send a function to make the change.

    You can try overriding the gallery row width using CSS…I’m not sure if it’ll work as the values are being set using JavaScript. To override the inline gallery width you could try:

    .tiled-gallery .gallery-row[style] {
        width: 100% !important;
    }
    
  4. 2 years, 10 months ago Andrew Misplon
    Hi, I Work Here

    Also the gallery widget works as full width using the Guttenberg block editor without any additional plugin. So how come I need a plugin when using the Siteorigin builder?

    The Gallery Widget and the Gallery Block are separate. The Gallery Block from what I can see in the source isn’t using $content_width. $content_width is used for the Gallery Widget regardless of whether or not the widget is used in Page Builder.

    If you’re using the Code Snippets plugin or a child theme the following can also be used to adjust the content width value:

    add_filter( 'siteorigin_north_content_width', function( $content_width ) {
    	return 1140;
    } );
Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More