Michiel
Member
Posted 4 years ago #
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!!
Michiel
Member
Posted 4 years ago #
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.
Michiel
Member
Posted 4 years ago #
Not really....
wish this forum would have a notification function...