Gallery Settings

Hi guys! I was wondering if it’s possible to increase width of the galleries to be as wide as the primary content container. Right now it’s smaller than the available width.

Another issue is that it’s left aligned even though my post and everything else is center aligned.

Please help with both issues. You can see what I’m talking about in this post.

Hi @lipstickalchemist,

I hope you are well today and thank you for your question.

You can centre align it by adding the following CSS code in the Custom CSS option of your theme on the below path.

Admin Area -> Appearance -> Customize -> Additional CSS

.entry-content .gallery-row {
    margin: 0 auto;
}

Are you using jetpack plugin to display these galleries?

If yes then you can increase its width by using the solution posted in the following page.

Best Regards,
Movin

The alignment is correct now, thank you!

Yes I use Jetpack galleries. I found this existing snippet in the functions.php file and replaced 697 pixels with 800 pixels. It looks great now! Is that the correct way of editing? I’m not very sure so if you could confirm, that would be great!

if ( ! isset( $content_width ) ) {
	$content_width = 697; /* pixels */
}

Please note you are making changes in the theme files therefore you have to make these changes again after theme updation as changes made in the theme files get lost on theme updation.

Alternatively you can use following plugin to achieve this.

Yes, I’ll keep that in mind, thanks :slight_smile:

You are most welcome here :slight_smile: