Back to Support Content and Media Blocks Change the Appearance of the Query Loop Block

Change the Appearance of the Query Loop Block

The Query Loop block is used to display blog posts (or other content types such as pages, testimonials, or projects) on your website in different visual layouts. This guide will help you to adjust how your content is presented in the Query Loop block.

Choose the Query Loop Layout

You can choose from many different designs to present your posts (or other types of content) within the Query Loop block using the following steps:

  1. In your site’s dashboard, navigate to Appearance → Editor.
  2. Select the template you want to edit, or click on the site preview to edit the homepage.
  3. Select the Query Loop block using List View.
  4. In the toolbar that appears above or below the block, click the “Change design” button.
  5. Browse from the collection of predesigned layouts and click the one you like the most to apply it.
  6. You can then further customize the layout using the steps in the next sections of this guide.

Customize the Post Template

Within the Query Loop block is the Post Template, which contains the individual elements of each post, like the title, date, featured image, content or excerpt, and more.

Customize the Post Elements

Within the Post Template, you can display the following elements with your posts:

Your theme’s templates may include some or all of these blocks. Using the List View, you can view the current structure of the blocks and add, move, and delete the individual elements as needed:

List view expanded to display the different blocks within the Query Loop.
List View showing the elements used in the Post Template

Many of the above elements contain unique settings in the block settings sidebar. For example, you can select the Date block to access settings that control the format the date is displayed in and to add a link on the date back to the post. The blocks also include standard block settings for Color, Typography, Dimensions, and Advanced in many cases.

Choose a List or Grid Layout

In the post template, you can adjust your content to display in a list format or a grid format:

  1. Select the Post Template in the List View, which is nested within the Query Loop block.
  2. In the toolbar that appears above or below the block, choose between the list and grid icons.
  3. Click the “Save” button.
In List View, the Post template is selected. An arrow points to the list and grid icons in the toolbar.

Add Pagination to the Query Loop

To add pagination to your posts displayed with a Query Loop block, take the following steps:

  1. From the List View, expand the Query Loop block and select Post Template:
Post Template is selected underneath Query Loop.
Post Template block, shown via List View
  1. Click the ellipses (three dots) next to Post Template and select “Add after“.
  2. Click the + block inserter and search for “Pagination“. Click it to add it to the post template so that the Pagination block appears after the Post Template:
Pagination is selected underneath Query Loop.
  1. Adjust the settings in the sidebar as desired. These include the orientation, color, and whether to display an arrow or chevron symbol with the pagination link.
  2. Click the “Save” button to apply your changes.

Adjust the Width of the Query Loop

You can customize the width of elements within the Query Loop block:

  1. In your site’s dashboard, navigate to Appearance → Editor.
  2. Select the template you want to edit, or click on the site preview to edit the homepage.
  3. Open List View and select the Query Loop block.
  4. View the block settings in the right sidebar. If you do not see the sidebar, you may need to click the Settings icon in the top-right corner to bring up the settings. This icon looks like a square with two uneven columns:
The settings icon in the Editor with a tooltip "Settings" below it.
Click the Settings icon to open the block settings
  1. Toggle the setting called “Inner blocks use content width” to the on position.
  2. In the “Content width” box, set a custom value for the regular width of content in pixels (or choose from other units like percentage or em).
  3. Set a custom value for the wide width of content, which applies to blocks set to “Wide” in their settings.
  4. Under “Justification“, set the content inside the Query Loop to the page’s left, center, or right.
  5. Click the “Save” button to save your changes.
The Query Loop Block Layout setting shows the "Inner blocks use content width" toggled on.

Was this guide helpful for you?

Not quite what you're looking for? Get Help!

Copied to clipboard!