🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials November 4, 2026

How to Build a Content Grid in WordPress (Masonry, Filters, Load More)

GravityExtra
How to Build a Content Grid in WordPress (Masonry, Filters, Load More)

Every WordPress site eventually needs to show content as something other than the blog list: a portfolio wall on the home page, the latest case studies as a carousel, a resource library visitors can filter, a product showcase on a landing page, a photo gallery that fills the screen. Themes rarely cover all of these, and the usual workarounds are a pile of page-builder widgets, a different gallery plugin for each job, or a custom query written by a developer.

This guide explains how to plan a content grid that people actually use, which layout suits which content, how filters, search and pagination change the way visitors browse, what to watch for with speed and search engines, and how to build all of it in a few minutes with the GravityExtra Content Grid plugin for WordPress.

What a content grid is, and why the blog list is not enough

A content grid is a set of cards, one per item, laid out in rows and columns. Each card shows a picture and a few facts about the item: a title, a date, a category, a price, a short excerpt, a button. The visitor scans many items at once and picks the one that interests them. That is very different from the blog list, which shows one long post after another and expects the visitor to scroll and read.

Grids work better whenever visitors are choosing rather than reading. Someone looking for a recipe, a project to admire, a tent to buy or a guide to download wants to compare options quickly. A good grid lets them see twelve options at a glance, narrow them down with one click and open the right one. A blog list makes them scroll past ten long excerpts to find the same thing.

Choosing the right layout

The layout should follow the shape of your content, not the other way round. Five layouts cover almost every case.

Grid: equal cards for comparing

A regular grid gives every card the same size and lines up the rows. It is the best choice when visitors compare items side by side: products, team members, services, articles. Crop the images to one ratio, for example 4:3 for articles or square for products, so the rows stay tidy even when the original photos have different shapes.

Masonry: mixed images without cropping

Masonry keeps the original height of each image and drops every card into the shortest column, so portrait and landscape photos sit together without cropping and without gaps. It suits portfolios, recipes and visual blogs, where the picture is the main attraction and cropping it would hurt.

A three-column masonry grid of trail stories on a website: filter buttons All stories, Hiking, Camping, Climbing and Travel above, a search box and a sort menu on the right, cards with landscape and portrait photos of different heights, category labels, titles, excerpts, dates and Read more buttons, and a Load more button below
A masonry grid of trail stories with category filter buttons, a search box and a sort menu.

Justified rows: galleries that fill the width

A justified layout builds rows of images that fill the full width at about the same height, each image keeping its own shape. It is the layout photo sites use, and it is the best way to show a gallery from the media library: no cropping, no ragged edges, and the row height you choose controls how big the photos look.

A justified photo gallery: rows of landscape, portrait and square images from the media library that fill the full width at the same height
A justified photo gallery from the media library: rows of images that fill the width at the same height.

Carousel: a few highlights in little space

A carousel shows one row that slides. It saves space on a home page or under an article and works well for a handful of highlights, such as featured projects, testimonials or new products. Keep it short: visitors rarely slide past the third screen, so put the most important items first, and use autoplay sparingly. A good carousel pauses as soon as the visitor hovers or uses the keyboard.

A two-column carousel of volunteer projects: cards with a photo, a project type label, the title and a short excerpt, with round previous and next arrows and dots below
A carousel of projects with arrows and dots.

List: when the words matter

A list puts one card per row with the image beside the text. It suits news, events, job openings and downloads, where the title and a longer excerpt matter more than the picture. On phones the image moves above the text so nothing gets squeezed.

Designing a card visitors understand

The card is where most grids go wrong. Too little information and visitors have to open every item; too much and the grid becomes a wall of text. Start from the question the visitor is asking. For a recipe it is “what is it and how long does it take”; for a product it is “what is it, what does it cost and can I buy it now”; for an article it is “what is it about and is it recent”.

  • Give every card a clear picture. Use the same ratio in a regular grid so the rows line up.
  • Keep the title short and make it the link. Two lines is the most a title should take.
  • Show one or two facts that help choosing: a category, a date, a price, a difficulty level from a custom field.
  • Use an excerpt only when the title is not enough, and keep it to about twenty words.
  • Put a button or an add-to-cart action at the bottom when the visitor’s next step is obvious.

Text over the image looks striking for portfolios and travel stories, where the picture carries the card and the title is short. Use a dark overlay so the text stays readable on any photo, and show it on hover only when the picture alone tells the visitor enough. On touch screens there is no hover, so a good grid shows the overlay all the time there.

Filters, search and sort: let visitors narrow the list

Once a grid has more than a dozen items, visitors need a way to narrow it down. Three tools cover nearly every need. Filter buttons by category or tag are the fastest: one click shows only climbing stories or only tents. Use buttons when there are up to eight or ten choices and a dropdown when there are more. A search box helps when visitors know what they want by name. A sort menu lets them choose between newest first, alphabetical or, for products, price and popularity.

All three should work without reloading the page. A reload throws the visitor back to the top, loses their scroll position and feels slow; an AJAX update replaces the cards in place in a fraction of a second. The filter buttons should also show which choice is active, both visually and to screen readers.

Pagination, load more or infinite scroll?

Loading every item at once makes the page slow, so a grid shows one page of items and offers a way to see more. Each option suits a different situation.

  • Numbered pages suit archives and libraries, where visitors want to know how much there is and come back to a particular page. When the page links are real links, search engines can follow them to every item.
  • A Load more button suits most grids on landing pages and home pages: the visitor stays in control, the footer stays reachable and the new cards appear under the ones already seen.
  • Infinite scroll suits visual feeds, such as photo walls and portfolios, where visitors browse rather than search. Avoid it on pages with important content in the footer, because the footer keeps moving away.

Products, archives and galleries: three special cases

Product grids need live data. Prices, sale badges and stock change all the time, so a grid that caches whole cards will sooner or later show yesterday’s price. The right approach caches only which products to show and builds each card fresh, with the price and the add-to-cart button exactly as the store prints them.

A four-column WooCommerce product grid: filter buttons for Tents, Packs and Lights, a sort menu, square product photos, red Sale badges on three products, centred titles, sale and regular prices and blue Add to cart buttons
A product grid with sale badges, prices, add-to-cart buttons, category filters and a price sort menu.

Archive pages, such as a category or a search results page, can use the same grid design as the rest of the site. The grid simply shows whatever archive the visitor is on, and its filters and Load more button must stay inside that archive.

Galleries from the media library work best as justified rows or masonry with a lightbox, so visitors can open each photo full size and move through the set with the arrow keys. Videos belong in the same lightbox: a play badge on the card, and the YouTube, Vimeo or video file opens without leaving the page.

The Content Grid lightbox over a dark background: a full-size landscape photo with its title as caption, a close button and previous and next buttons
The lightbox showing a full-size photo with its caption and the previous and next buttons.

Speed and search engines

A grid can make a page fast or slow. Four habits keep it fast. Render the first page of cards on the server, so they show at once and search engines can read them. Serve images at the size the card needs, with responsive image sizes, so phones download small files. Load images below the first row lazily. And cache the query, the expensive part, rather than the HTML, so the cache can stay on without showing stale prices.

Avoid grids that load everything from outside services: fonts, icon libraries and scripts from other sites add requests, can break when those services change, and may need a mention in your privacy notice. A grid plugin should bring its own small stylesheet and script and load them only on the pages that show a grid.

Building it with the GravityExtra Content Grid plugin

The GravityExtra Content Grid plugin puts everything above into one visual builder. You create a grid in six steps and the live preview shows the result with your real content as you go.

  • Source: tick posts, pages, any custom post type, WooCommerce products or the media library, or choose the current archive.
  • Query: set the number of items, the order, taxonomy rules, custom field rules and the items to include or exclude.
  • Layout: pick grid, masonry, justified, carousel or list, then the columns and gaps for desktop, tablet and phone.
  • Card: start from a template and drag elements into place, in the card body or over the image; set colours, corners, shadow and the hover effect.
  • Filters and paging: switch on filter buttons or a dropdown, the search box, the sort menu and numbered pages, a Load more button or infinite scroll.
  • Lightbox and links: open posts, or open images and videos in the lightbox.
The Content Grid builder in the WordPress admin: a bar with the grid name and Save grid button, settings tabs on the left with the Card tab open showing a card template menu, the list of draggable card elements with their position menus and the card style settings, and on the right a live preview of a three-column masonry grid of trail stories with filter buttons
The grid builder with the card element editor on the left and the live preview on the right.

Save the grid and place it anywhere: with the Content Grid block in the block editor, with its shortcode in any editor, widget or template, or with the Content Grid widget in Elementor. The same grid can appear on many pages, and changing it once changes it everywhere.

The plugin works on its own, with any theme, and needs no Gravity Forms. It mirrors the whole grid on right-to-left sites, works with the keyboard and screen readers, caches only the list of items so prices and stock stay live, and loads no outside files.

The masonry grid on a right-to-left site: the filter buttons start on the right, the first card is in the right-hand column and the text is aligned to the right
The same masonry grid on a right-to-left site: the first card on the right and the filter bar mirrored.

A quick checklist before you publish

  • Does the layout fit the content: equal cards for comparing, masonry for mixed photos, justified rows for galleries, a list for text?
  • Can a visitor tell what each item is from the card alone?
  • Can they narrow the list in one click, and does the active filter show?
  • Does the grid still look right on a phone, with fewer columns and readable text?
  • Does the first page show before any script runs, and are the images sized for the card?
  • If you sell products, are the prices and stock current on every card?

Ready to build yours? See the GravityExtra Content Grid plugin for the full feature list and plans, or read the setup guide for every setting.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr