• Skip to primary navigation
  • Skip to main content
  • Skip to footer

altaneus

Pensées pour moi-même...

  • Home
  • Snippets
  • About

Set the Jetpack Tiled Gallery Width

Publié le 5 October 2015 par Stefano / Dernière modification le 5 October 2015

There is a way to force the Jetpack Tiled Gallery with: it’s actually a filter to a function available in Jetpack.

Look for “$tiled_gallery_content_width” in the “tiled-gallery.php” module and you’ll notice that the default width is 500px.

https://github.com/Automattic/jetpack/blob/master/modules/tiled-gallery/tiled-gallery.php

Here’s how to change the tiled gallery size using a filter:

add_filter( 'tiled_gallery_content_width', 'personal_full_tiled_gallery_width' );
function personal_full_tiled_gallery_width( $width ) {
    $width = 1140;
    return $width;
}

Alternate way: redefine the global variable “$content_width” in the template.

See example here: https://developer.wordpress.com/themes/content-width/

References

http://hookr.io/filters/tiled_gallery_content_width/
http://www.functionsphp.com/jetpack-tiled-gallery-width/
http://wpsites.net/web-design/change-tiled-gallery-content-width-for-jetpacks-tiled-galleries/

Filed Under: Genesis, Non classé

Previous Post: « Ajouter la date de la dernière modification d’un post
Next Post: Gallery jQuery slider using bxslider »

Footer

Recent Posts

  • Jetpack Stats – il va falloir payer
  • Jetpack Personal : augmentation de prix
  • Générateurs de mots de passes
  • Générateur de GUID/UUID
  • Appareil photo du Samsung S22 Ultra

Categories

  • Apache
  • Cloudflare
  • DNS
  • Genesis
  • Infomaniak
  • Jetpack
  • Non classé
  • Outils
  • Photographie
  • Sécurité
  • Uncategorized
  • Wordpress
  • WP Rocket

Copyright © 2025 · Genesis Framework · WordPress · Log in