The block’s options can be split into three distinct sections. The styles, the query and the layout.
This section allows you to select between predefined block styles (if available) which will change the appearance of the displayed post grid.
This section will create the query which will return the post types we want in our grid.
- Post Type: Select a post type to pull the posts from.
- Base Category: Select a category/taxonomy term to further narrow down the results.
- Author: Return only posts from a specific author.
- Excluded Posts: Exclude certain posts from the results.
- Included Posts: Include certain posts to the results (can be used to create a grid of hand-picked posts).
- Posts Per Page: Set the number of posts you want to see per page on the grid.
- Pagination: Enable or disable the pagination.
- Offset: Skip one or more posts from the start of the query.
- Order By: Select by which attribute your posts will be ordered from (i.e. date, title, id etc).
- Order: Display the posts in an ascending or descending order.
Here you can select how many columns your grid will have, choose to enable or disable grid gutters, toggle the category filtering buttons and set a label for the button on each post type item.
Via the Animation controls panel you can set up how you want the block to animate upon entering the viewport as your visitors scroll.
- Animation type: Choose the animation type for the block. You can select from Fade, Slide Up / Down / Left / Right, Zoom In / Out, and Flip Up / Down / Left / Right. Set to None if you want to disable the animation.
- Duration: Controls how long the animation will take from start to finish. Defaults to 0.7 seconds.
- Delay: Controls the delay from the moment the element enters the viewport to the moment when the animation will begin.
- Easing: Controls the animation’s easing. Refer to the easings page for a visual representation.
- Repeat animation: Repeat the animation for the block every time it enters the viewport. While your users scroll down the animation will fire, and when they scroll back up it will fire again. Every time the block leaves the viewport the animation will be reset.
Note: If you don’t plan on using animations you can turn them off globally in Settings > GutenBee settings. You can disable the “Enable block animation controls” checkbox and the animation panels and scripts will stop showing up and loading.
Post Type Templates
The post types block offers templates which allow you to change the structure of the grid items. To do that you will first need to create a child theme, or if using the one of our themes grab it from our downloads section.
Once you have the child theme installed create a folder inside it called template-parts and inside that create another folder called gutenbee.
Next navigate to the /wp-content/plugins/gutenbee/src/blocks/post-types-templates/ folder of the GutenBee plugin and copy the article-default.php and article-media.php files in the /template-parts/gutenbee/ folder you have created in the previous step.
Now you can edit these two files with your preferred code editor and modify the markup according to your needs. The article-media.php takes care of the appearance of grid items when the grid has only one column, and the article-default.php works for 2-4 columned layouts.