peterwilsoncc / random-post-redirect
This package is abandoned and no longer maintained.
No replacement package was suggested.
Random Post Redirect.
Package info
github.com/peterwilsoncc/random-post-redirect
Type:wordpress-plugin
pkg:composer/peterwilsoncc/random-post-redirect
1.0.0
2026-09-24 23:29 UTC
Requires
None
Requires (Dev)
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Plugin land proof of concept for WP #64498.
This repo has been archived
The feature has now landed in WordPress Core so the POC is no longer required. See:
- WP #64498
- Make WordPress Core: Your Content Is Going To Get More Random!
- WordPress/WordPress-Develop@
757cb9c - WordPress/WordPress-Develop@
9d949f3 - WordPress/WordPress-Develop@
eed6f20 - WordPress/WordPress-Develop@
2f8310c
Implemented
?randomQuery variable- Redirect requests use the main
WP_Query - Redirects added using the
wp_headersfilter (with filters fromwp_safe_redirect()etc) - Exits on the
send_headersactions to avoid rendering the full page
Todo
- Decide how to expose this feature to regular users: opt-in, opt-out? how can they discover it?
- Decide how to expose this feature to developers: can CPTs opt in, or will it initially be limited to built-in types?
- Decide whether
parse_requestorpre_get_postsshould be used for setting query variables - Proper rewrite rule, either
/random/suffixor/prefix/random-- Jorbin has suggested the former -- for blog, term, post type archives - Decide if same is needed for date archives
- Tests beyond just the plugin meta data tests.
Known issues
- Currently accepts
?randomon all URLS, includingis_singular()which redirects to itself
Install
Note
The Composer package has been marked as abandoned.
composer require peterwilsoncc/random-post-redirect
Yolo install
composer require peterwilsoncc/random-post-redirect:dev-main
Demo (Yolo install, auto updates from main twice weekly, 5 4 * * 1,4)
Note
These URLs are no longer active as the plugin has been removed pending the WordPress 7.2 release.