How to Highlight the First Post Across Two Columns in a Bricks Archive (without Posts Module)

This tutorial shows how to create a two-column archive layout in Bricks Builder where the first (most recent) post spans across both columns, followed by regular posts in a grid. This is achieved using two separate query loops with custom offset and posts per page settings.

Why not use the built-in Posts element?

Bricks Builder’s Posts element includes a built-in option to style the first post differently (e.g., make it span full width). However, this solution wasn’t applicable here because the layout required a fully custom structure for each post entry – which is not possible within the confines of the Posts module. Therefore, we built the archive manually using the Query Loop feature.

1. Layout Structure

The archive layout consists of a container using CSS Grid with two columns. Inside the grid:

  • The first post is displayed full-width across both columns
  • The remaining posts are displayed normally in two columns

2. Implementation Using Two Query Loops

2.1. Loop 1: Featured Post

Create the first Query Loop and configure it to return only one post:

  • Offset: 0
  • Posts per page: 1

Add a custom class like .featured-post to the wrapper element and apply the following CSS:

.featured-post {
  grid-column: 1 / -1;
}

2.2. Loop 2: Remaining Posts

Below the featured post, create a second Query Loop for the remaining entries:

  • Offset: 1
  • Posts per page: Any number (e.g., 9)

These posts will fill the grid in two columns.

3. Grid Layout via CSS or Grid Builder

You can define the container as a CSS Grid manually using the following CSS:

.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

Alternatively, if you’re using a newer version of Bricks, you can configure the grid layout with the visual grid builder. This allows you to set column count, gaps, and spanning behavior visually without writing CSS.

4. Filtering Considerations

This setup works with taxonomy and meta filtering, as long as both query loops are configured identically (same post type, same query conditions). However, if you’re using AJAX filters, live search, or pagination, consider using a single Query Loop and dynamically control the layout using the {bricks/loop_index} tag.

5. Conclusion

Creating a custom archive with two Query Loops in Bricks offers layout flexibility beyond what the standard Posts element provides. It’s a practical solution when you need precise control over how each post is rendered, especially when the first post requires a different visual treatment.

Hinterlassen Sie den ersten Kommentar