Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/bayzid-dev/recent-post-dynamic-block/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
A Gutenberg block to showcase recent posts with customizable layout, display options, and optional "Load More" functionality.
Features
- Display recent posts in Grid or Carousel layout.
- Optionally show featured images, excerpts, author names, and publish dates.
- Filter posts by taxonomy (categories or custom taxonomies) and selected terms.
- Load posts dynamically using AJAX/REST API with a Load More button.
- Fully responsive and works with modern WordPress block editor.
- Supports color customization for text and background.
Installation
- Upload the plugin folder to
/wp-content/plugins/recent-posts-showcase/. - Activate the plugin through the Plugins menu in WordPress.
- Add the Recent Posts Showcase block to your post, page, or widget area.
Block Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
postType |
string | post |
Post type to display (e.g., post, page, or custom post type). |
taxonomy |
string | category |
Taxonomy to filter posts (category, tag, or custom taxonomy). |
terms |
array | [] |
Specific term IDs for filtering posts. |
postsToShow |
number | 6 |
Number of posts to show initially. |
layout |
string | grid |
Layout style (grid or carousel). |
displayImage |
boolean | true |
Whether to display featured images. |
displayExcerpt |
boolean | true |
Whether to display post excerpts. |
displayAuthor |
boolean | true |
Whether to display post author names. |
displayDate |
boolean | true |
Whether to display post publish dates. |
enableLoadMore |
boolean | false |
Enable the AJAX "Load More" button for additional posts. |
Usage
- Add the block to your content area.
- Configure the layout and display options in the block editor sidebar.
- If "Load More" is enabled, users can click the button to dynamically load more posts without reloading the page.
REST API Endpoint
The block uses a custom REST API endpoint for the "Load More" functionality: