Description
WordPress 7.2 adds random content redirects for URLs such as /random/ and for archive requests containing ?random=1. This plugin turns off that feature through the wp_enable_random_content_redirect filter.
The plugin refreshes rewrite rules when activated or deactivated. In a multisite network, it clears each site’s saved rules so WordPress can regenerate them with that site’s own settings on the next request.
Installation
- Install the plugin in
/wp-content/plugins/disable-random-content/. - Activate it for one site or across the network.
FAQ
-
Does this disable all random ordering in WordPress?
-
No. It disables the random content redirect feature. Queries that explicitly use random ordering for other purposes are unaffected.
-
What happens to existing `/random/` URLs?
-
The plugin removes the special rewrite rules. Those URLs then follow the site’s ordinary routing rules.
Reviews
Contributors & Developers
“Disable Random Content” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Disable Random Content” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.1.0
- Keep random content redirects disabled after deactivation and reactivation in the same request.
1.0.0
- Disable random content redirects and their rewrite rules.
- Refresh site and network rewrite rules when activation status changes.
