Post Template block

In this article

Go back to the list of Blocks

The Post Template block is a container block that is nested in the Query Loop block. This block contains inner block elements used to display a post in the Query loop block such as the post title, post content or excerpt, date, and featured image.

To find the Post Template block, click the Block Inserter icon, then search for the Query Loop block. Click on it to insert the block to the editor. Alternatively, you can type /query-loop to quickly insert the Query Loop block. Click Choose to open a selection of patterns. Use the arrow icons (at the bottom) to move from one pattern to another. Click on the Choose button to confirm the selection.

To have the Post Template block load only the posts from a specific category, add a new template for that category in the Template Editor and enable the inherit query under the Query Loop block settings.

Block toolbar

When users select a block, the block toolbar containing a number of control buttons will appear above the selected block. The Post Template block toolbar includes the following tools:

Select query loop

Block toolbar in the Post Template block

This button will select the Query Loop block, which is the Post Template’s parent block.

Transform to

Transform option in the Post Template block

Users can transform the Post Template block into a Columns or a Group block.

Block-moving tools

Block moving tools in the Post Template block

Use the block-moving tools to move the Post Template block. The six dots icon allows you to freely reposition the block anywhere within the editor by dragging and dropping it. You can also use the arrows icon to move the block up or down the editor.

Change alignment

Change alignment in the Post Template block

Use the change alignment tool to reposition the Post Template block inside the Query Loop block. The following is a list of the block alignment options:

  • None
  • Wide width
  • Full width
  • Align left
  • Align center
  • Align right

When the parent Query Loop block’s Layout settings – inner blocks use content width option is enabled, the Post Template block will inherit the layout settings from the parent Query Loop block.

Parent query loop block has layout settings enabled

More options

More options in the Post Template block

The More Options menu represented by three vertical dots on the far right of the toolbar gives you more features such as the ability to duplicate, remove, or edit your block as HTML.

Read about these and other settings.

Block settings

Every WordPress block has specific configuration options in the editor sidebar as the additional settings in the block toolbar. To toggle the sidebar, you can click the cog icon.

The Post Template block has two settings in the block settings panel.

Typography

The Post Template block provides typography settings to change the font family, appearance, line height, letter spacing, decoration, letter case, and font size.

For details refer to this support article: Typography settings overview

Advanced

The Advanced settings tab lets you add additional CSS classe(s) that allows you to write custom CSS styles for the block.

Changelog

  • Created 2022-11-23

Was this article helpful? How could it be improved?

First published

Last updated