manifest / performance / refresh-custom-posttype-archives
Refresh Custom Post Type Archives
Select post types and pages to clear cache when a post is updated.
by Dustin Wight · github.com/undfine/refresh-custom-posttype-archives
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/undfine/refresh-custom-posttype-archives/archive/refs/heads/main.zipReadme
Refresh Custom Post-type Archives
A WordPress plugin that allows you to automatically clear cache and refresh specific pages when certain post types are updated.
Description
This plugin provides a settings interface where you can:
- Select which post types to monitor
- Choose specific pages to refresh when posts are updated
- Option to force update pages instead of just clearing cache
Features
- Supports all public post types
- Multiple page selection per post type
- Cache-aware page list for better performance
- Compatible with popular caching plugins
- Force update option for stubborn caches
- Selective refresh for individual post types
- Automatic cleanup of deleted pages from settings
Installation
- Upload the plugin files to
/wp-content/plugins/refresh-custom-posttype-archives - Activate the plugin through the 'Plugins' screen in WordPress
- Use the Settings->Refresh CPT Archives screen to configure the plugin
Usage
- Go to Settings -> Refresh CPT Archives
- For each post type, select the pages that should be refreshed when posts of that type are updated
- Optionally enable "Force Update" if simple cache clearing isn't sufficient
- Save your settings
Requirements
- WordPress 5.0 or higher
- PHP 7.4 or higher
Changelog
1.0.3
- Fixed cache clearing function for WP Engine, to use WpeCommon::purge_varnish_cache($post_id)
1.0.2
- Removed Select2 included files to src from CDN
1.0.1
- Added selective refresh functionality
- Improved cache handling
- Added automatic cleanup of deleted pages
- Fixed compatibility issues with some caching plugins
1.0
- Initial release
Credits
Developed by Dustin Wight