insert gallery (4 posts)

  1. ronchicago
    Posted 6 years ago #

    where is the layout control for "insert gallery" option when adding images. my post's full-size pix are 500px wide. it would be nice if a three-column gallery would also be 500 px wide.

  2. esmi
    Forum Moderator
    Posted 6 years ago #

    There isn't a gallery layout control button. You can control the width of your gallery via your theme's stylesheet.

  3. ronchicago
    Posted 6 years ago #

    agreed, no button option. what is the hook, div class, name, for the wp gallery ?? so i can create the css. does it already exist on my stylesheet ?

  4. esmi
    Forum Moderator
    Posted 6 years ago #

    Depends on the theme. By default, the gallery css is added to the page body - which is actually incorrect. In some themes, this default behaviour has been disabled by adding:

    add_filter('gallery_style', create_function('$a', 'return "
    <div class=\'gallery\'>";'));

    to the functions.php file. The end result is that all of the gallery css has to be in the theme stylesheet - which does make it a lot easier to control.

    I'd suggest checking the source of a gallery page on your site first. If there is css in the body just before the gallery markup, copy it and add it to your theme's stylesheet. Then disable the default css using the code above in functions.php. At that point, you can start tweaking the css in your stylesheet to suit your purposes.

    Trying to just amend your stylesheet without disabling the default css can be tricky as inline css always trumps an external sheet.

Topic Closed

This topic has been closed to new replies.

About this Topic