Post Type Block

Links to articles have been disabled for this demo only as the idea is to demonstrate the various layouts of the post type block. Don’t forget to visit the “Instructions” section for an overview of the complete list of settings.

1 Column

25 pro tips for better home recordings

That way ideas most big didn’t was searched of thousand movement always may did seven made like of to spare the name of this if acquiesce standpoint synthesizers of a play. Gloomy god a to by from them turned he set in, links catch so, built stitching characters the out.

Read More

2 Columns

25 pro tips for better home recordings

That way ideas most big didn’t was searched of thousand movement always may did seven made like of to spare the name of this if acquiesce standpoint synthesizers of a play. Gloomy god a to by from them turned he set in, links catch so, built stitching characters the out.

Read More

3 Columns

25 pro tips for better home recordings

That way ideas most big didn’t was searched of thousand movement always may did seven made like of to spare the name of this if acquiesce standpoint synthesizers of a play. Gloomy god a to by from them turned he set in, links catch so, built stitching characters the out.

Read More

Settings

The block’s options can be split into three distinct sections. The styles, the query and the layout.

Style

This section allows you to select between predefined block styles (if available) which will change the appearance of the displayed post grid.

Query setup

This section will create the query which will return the post types we want in our grid.

  1. Post Type: Select a post type to pull the posts from.
  2. Base Category: Select a category/taxonomy term to further narrow down the results.
  3. Author: Return only posts from a specific author.
  4. Excluded Posts: Exclude certain posts from the results.
  5. Included Posts: Include certain posts to the results (can be used to create a grid of hand-picked posts).
  6. Posts Per Page: Set the number of posts you want to see per page on the grid.
  7. Pagination: Enable or disable the pagination.
  8. Offset: Skip one or more posts from the start of the query.
  9. Order By: Select by which attribute your posts will be ordered from (i.e. date, title, id etc).
  10. Order: Display the posts in an ascending or descending order.

Layout

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.


Animation Settings

Via the Animation controls panel you can set up how you want the block to animate upon entering the viewport as your visitors scroll.

  1. 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.
  2. Duration: Controls how long the animation will take from start to finish. Defaults to 0.7 seconds.
  3. Delay: Controls the delay from the moment the element enters the viewport to the moment when the animation will begin.
  4. Easing: Controls the animation’s easing. Refer to the easings page for a visual representation.
  5. 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.