Ready to get started?Download WordPress


WordPress Gallery: Display the first image/thumbnail of a gallery only (4 posts)

  1. phr4pp
    Posted 1 year ago #

    I'm looking for a seemingly simple solution to display only the first image/thumbnail of a WordPress gallery. The problem:

    I'm using the WordPress Gallery (with the Jetpack jCarousel) for my galleries. Everything is working fine. But I've got one problem:

    I would like the WordPress Gallery to show only the first or only one image of a gallery instead of all. I've been searching for quite a long time but didn't find a solution yet. It should be quite a simple code (I can't programm) to do just that.

    Does anyone have a solution for that?
    Simply display only the first image/thumbnail of the gallery - when you click on it the gallery shall still open with all images as usual.

    Thanks in advance!

  2. phr4pp
    Posted 1 year ago #

    Another solution/code that would help me is to specify the number of images/thumbnails the gallery shows.

  3. phr4pp
    Posted 1 year ago #

    I have found a solution with CSS. Not perfect, but it works:

    .gallery-item {
    .gallery .gallery-item:first-child {
      display:block !important;

    Hide all gallery images and only display the first image.

  4. Jason
    Posted 9 months ago #

    This appears to work well if you're using the built-in WP Gallery (as you mention above). Just tried it out and works great! Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic