peterwilsoncc / random-post-redirect
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.
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 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
composer require peterwilsoncc/random-post-redirect
Yolo install
composer require peterwilsoncc/random-post-redirect:dev-main