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/tmeister/wp-random-off/archive/refs/heads/main.zipDisables the /random/ redirect that WordPress 7.2 adds to your site.
Why
WordPress 7.2 adds a /random/ URL that sends visitors to a random piece of content on your site. If you'd rather not have it, this plugin turns it off.
There are no settings. Activate the plugin to disable the redirect, and deactivate it to bring the core behavior back.
How it works
The whole plugin is one filter:
add_filter( 'wp_enable_random_content_redirect', '__return_false' );
It stores no data, adds no database tables, and makes no external requests.
Installation
From WordPress.org
- In your admin, go to Plugins → Add New and search for "Random Off".
- Click Install Now, then Activate.
From this repo
cd wp-content/plugins
git clone https://github.com/Tmeister/wp-random-off.git random-off
Then activate Random Off on the Plugins screen. You can also do it with WP-CLI:
wp plugin activate random-off
Without the plugin
If you'd rather not install a plugin, add the same filter to a must-use plugin or to your theme's functions.php:
add_filter( 'wp_enable_random_content_redirect', '__return_false' );
Requirements
- WordPress 7.2 or later
- PHP 7.4 or later
Changelog
1.0.0
- Initial release.
License
Made by Enrique Chavez.