WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
[resolved] Gallery Width (9 posts)

  1. bryananthonylewis
    Member
    Posted 1 year ago #

    Is there a way to auto set the galleries width to 100%? I've got a gallery and its width is auto set to 495px. Is there anyway to change that?

    http://www.bryananthonylewis.com/2013/02/22/san-francisco/

    I'd like the gallery to fill up the page if that's possible.

    http://wordpress.org/extend/plugins/jetpack/

  2. 3cstudio
    Member
    Posted 1 year ago #

    I too am experiencing this and would love to have it simply fill 100% of the space it is set in - no other gallery or lightbox plugins are installed. I followed another post's suggestion to add:

    if ( ! isset( $content_width ) )
    $content_width = 940;

    to functions.php, but I had no change in the setup, even after a server cache clearing (nginx) and a disable/re-enable of Tiled Galleries.

    http://dev.zahnhomes.com/portfolio-photo-albums/specialty-rooms/

    Any thoughts/direction would be greatly appreciated.

  3. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Adding a $content_width value should do the trick indeed.

    If that doesn't help, could you check that the $content_width was not already defined somewhere else in your theme, or in a parent theme?

  4. bryananthonylewis
    Member
    Posted 1 year ago #

    Can I do something like this?

    if ( ! isset( $content_width ) )
    $content_width = 100%;

  5. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    I'm afraid not. The width is in pixels. You can read about it here:
    http://codex.wordpress.org/Content_Width

  6. bryananthonylewis
    Member
    Posted 1 year ago #

    I find that adding...

    //add supported width for galleries - jetpack
    if ( ! isset( $content_width ) )
    $content_width = 760;

    really screws up the layout. I think I'll just switch to another plugin and avoid this headache don't the road.

  7. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Your theme's content width seems to be set to 730px at the moment. What happens when you set the $content_width value to 730px?

  8. bryananthonylewis
    Member
    Posted 1 year ago #

    That seemed to work just fine. Crazy. I wondering why going over to 760 didn't make it look overlapping. I was starting to get confused. Thank you very much! I'm very appreciative of the great support!

  9. 3cstudio
    Member
    Posted 1 year ago #

    Jeremy, thanks for the knowledge -- it was indeed a function of the theme (child actually, not the parent). Secondary pages were set to a 2-column instead single that I was seeking, so now things look great! No need to edit the functions.php file further... just needed to get my child theme settings squared away. :)

    Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic