
A Gutenberg Block to display a list of custom post type entries.
Osom Blocks is a block to list Custom Post Types, ideally to use with OsomPress themes.
With Osom Custom Post Type Block you can display a list of CPT entries and customize:
1. The Custom Post Type.
2. Number of posts.
3. Display/hide the featured image.
4. Display/hide the excerpt.
5. Choose grid display
6. Choose the number of columns for the grid layout
7. Choose the title HTML markup (H2, H3 or H4).
8. Customize the “read more” text.
9. Display/hide parent post/pages (only in hierarchical Custom Post Types).
10. Display/hide pagination.
Deprecation Notice
Important: We want to inform you that the plugin will be deprecated in future releases. For new sites we highly encourage you use the native query loop block, which now supports listing of Custom Post Types seamlessly.
We appreciate your understanding.
Follow Along
Screenshots

Osom Blocks settings posts

Osom Blocks settings CPT

Osom Blocks CPT grid layout

Osom Blocks settings
FAQ
Can Osom Blocks be used with any theme?
Yes, you can use Osom Blocks with any theme.
Do I need the new block editor to use Osom Blocks?
Yes, you will need to have WordPress 5.0 or later installed to take advantage of Osom Blocks.
Can I display any Custom Post Type?
Yes, all the CPT will automatically populate and you only need to choose it from the dropdown.
I’m seeing more posts than I selected in the settings, why is that?
If more posts than selected are displaying, make sure you activate “Ignore sticky posts” toggle.
I’m not seeing one (or more) Custom Post Type, why is that?
If you have created the CPT make sure you use the argument “show_in_rest” => true, when registering. If it’s created by third party you can use the filter register_post_type_args to add the support.
ChangeLog
1.2.1
- Fixed pagination behavior in home page.
1.2
- Tested on WordPress 5.9.
- Added filter to modify the loop arguments (osom_blocks_args).
1.1.2
- Added responsive break points to the grid layout.
1.1.1
- Added: ClassName
- Changed text domain for some strings
1.1
- This version adds most of the most popular request we’ve received so far.
- New: Now CPTs are auto-populated and you can select them from the dropdown
- Added: possibility to filter by tags or categories when “post” is selected
- Added: display/hide parent posts toggle (only in hierarchical CPTs)
- Added: setting to chose the number of columns when grid layout is selected
- Added: display/hide sticky posts toggle
- Added: display/hide pagination toggle
1.0.2
- Added: grid layout
- Fixed: HTML tags issue
1.0.1
1.0
- Initial release.
- Add the Customizable Button block.
- Includes Custom Post Type Block