• I’d like to set the number of columns for the gallery with one global setting as I like to keep things flexible in case I change my theme.

    I know I can use the code [gallery columns="4"] inside a post but I’d like to do this for all posts on my blog in one go…

    Is this possible somehow?

    Many thanks for your help!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Michiel

    (@michiel)

    I now figured out that I could do this using the following:
    <?php echo do_shortcode('[gallery columns="4"]'); ?>
    in my template index.php to set this globally for all galleries.

    The only question I still have is where in the index.php this code should be placed? I have been trying different places but seem to end up with two galleries per post, one with the default 3 columns and then one with the above 4 columns.

    any luck with this?

    Thread Starter Michiel

    (@michiel)

    Not really….
    wish this forum would have a notification function…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to set the # of gallery columns with one global setting?’ is closed to new replies.