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/michelmany/dmg-read-more/archive/refs/heads/master.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
dmg-read-more WordPress Plugin
Overview
The dmg-read-more plugin adds a custom Gutenberg block to your WordPress site, allowing users to easily create "Read More" links to posts. It also includes a WP-CLI command for searching posts that contain the block.
Features
-
Gutenberg Block:
- Register a custom block using native WordPress block editor APIs.
- Search for posts by title or Post ID.
- Paginate results and show recent posts by default.
- Real-time preview of selected post with a "Read More" link.
-
WP-CLI Command:
- Custom command to search for posts containing the "Read More" block.
- Filter posts by date, with a default of the last 30 days.
- Outputs matching Post IDs to the console.
Installation
- Download the plugin files and place them in the
wp-content/plugins/dmg-read-moredirectory. - Activate the plugin through the 'Plugins' menu in WordPress.
Usage
Gutenberg Block
- Add the "Read More" block to your post or page.
- Use the InspectorControls to search for posts and select one.
- The selected post will be displayed as a "Read More" link.
WP-CLI Command
- Use the command:
wp dmg-read-more search [--date-before=YYYY-MM-DD] [--date-after=YYYY-MM-DD] - If no dates are provided, it will search for posts from the last 30 days.
Development
- The plugin uses modern JavaScript and WordPress APIs.
- Ensure you have Node.js and npm installed for building the block assets.