Some things may look a little different on your site
We are currently transitioning from an old set of blocks to these new ones. Please note that the following documentation is for the new blocks. While some things may look similar, there will be likely be some notable differences, so please use caution when referring to these documents and feel free to reach out if you have any questions.
Introduction
The posts block allows you to display posts from your blog or another site. With powerful filtering and styling options, this block gives you many different options when it comes to showing groups of content on your site.
Options
Content Source
Choose between populating posts from the current site or another site. If you choose posts from another site, you’ll need to supply an external link (i.e. news.cals.wisc.edu) and posts will populate from that site.
If you are using posts from another site, make sure that you are confident the content is appropriate and relevant. We are not responsible for the content you fetch from another site. Keep in mind, only WordPress sites are supported, and not all sites make their posts public. If the provided URL cannot be used to display posts, an error message will be displayed.
Number of Posts
The maximum number of posts you would like to display. If there are not enough posts, only the number of available posts will display.
Show/Hide Elements
Allows you to toggle which content to display in each post. Currently you can display the image, date, and excerpt. The title will always display. If the image is enabled but the source post doesn’t have an image, a placeholder will display.
Source Filters
- Offset: The number of posts to skip over. For example, if you put “3” the block will skip over the 3 most recent posts before loading.
- Categories: The category ID(s), separated by commas, that you would like to display. Any post matching at least one of the categories will display. Clicking into the text field will display a popup list of available categories from the source.
Example: 2, 17, 6 - Tags: The tag ID(s), separated by commas, that you would like to display. Any post matching at least one of the tags will display. Clicking into the text field will display a popup list of the top 100 tags from the source.
Example: 1, 37, 5
Advanced Filters
- Post Type: The post type to use. By default, this block will use posts from the “posts” post type. Clicking into the text field will display all available post types from the source.
- Other Parameters: If you need more advanced sorting and filtering options than are provided in the interface, they can be added here.
https://developer.wordpress.org/rest-api/reference/posts/
Styles
Post Layout
- Grid (most common): Content will be displayed in a grid layout. You can specify the number of columns (2-4) that you would like to display.
- List: Display posts in a 1 column grid with the images on the left or right.
- Carousel: Display posts in a carousel layout. You can specify the number of columns to display per page.
Style
- Default: Image above heading/excerpt/date. Available in grid and carousel layout only.
- Image on Left/Right: Display the image in the left or right third of the card.
- Minimal: Only show the image and content with no styling around the post.
- Content Overlaying Image: Display heading, excerpt, and date on top of the image. Available in grid and carousel layout only. If you opt to hide the featured image, this option is not available.
Posts Heading Tag
This is used for accessibility purposes. Your posts titles should use the appropriate heading tag based on the layout of your page. By default, it will use an h3 tag (assumes there is a heading with an h2 above the posts that introduces the posts section.)