The Post Carousel block allows you to display a set of articles as an AMP-compatible slideshow. You can show the most recently published, or restrict the articles that appear based on their category, tags, or author.
Using the Post Carousel block
To use the Post Carousel block, follow these steps:
- Edit the post or page where you would like to add the block.
- Open the Gutenberg block selector and search for ‘Carousel’, or scroll down to the Newspack section of the dropdown and pick Post Carousel block:
Clicking on the Post Carousel block will bring up the block toolbar:
From there, you can use the Block Width option to pick whether to show the block as Aligned Center, Wide Width (wide but with padding on both sides) or Full Width (spanning the screen from edge to edge with no padding):
When the Post Carousel block is selected, a number of display options will also be available in the right-hand column.
The block’s Display Setting allow to you control what articles will be shown:
Number of items – Allows you to select the number of posts to display in the block. The default is three.
Authors – Allows you to display posts by one or more authors.
Categories – Allows you to display posts by one or more categories.
Tags – Allows you to display posts by or more tags.
By default, the Post Carousel will not play automatically, but you can enable that option by toggling on Autoplay under Slideshow Settings:
Article Meta Settings
Show Date – Allows you to show or hide the post dates in the block. The date is shown by default.
Show Category – Allows you to show or hide each post’s Primary Category when Yoast is enabled, or first-assigned category when it is not. The category links to its archive page. The category is hidden by default.
Show Author – Allows you to show or hide the author(s) of the current post. Each author name links to an archive of all of their posts. The author is displayed by default.
Show Author Avatar – Allows you to show or hide each author’s avatar. The author avatars are displayed by default.