You have the possibility to display several galleries (with enabled option “Display only first image”) in one line on your page.
This is the simple example of how it looks:
To do this:
- Go to the Appearance menu at WordPress Dashboard and open Editor:
- In the right list find footer.php and open it:
- In this window before string
<?php wp_footer(); ?>
you need to enter the code below:
<script> (function($) { $('.grid-gallery.one-photo').each(function() { var $this = $(this); $this.css({ display: 'inline-block', width: $this.data('width') + 'px', margin: $this.data('offset') / 2 + 'px' }) }).wrapAll($('<div>').css('text-align', 'center')); })(jQuery); </script>
Don’t forget to save your changes by clicking on “Update File”.
Now you are able to display your galleries in one line.