Disable Random Content

描述

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.

安装

  1. Install the plugin in /wp-content/plugins/disable-random-content/.
  2. Activate it for one site or across the network.

常见问题

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.

评价

2026 年 11 月 12 日
This plugin will be the most popular after release of WP 7.2! Author, thank you for saving us from WP random!
阅读所有1条评价

贡献者及开发者

「Disable Random Content」是开源软件。 以下人员对此插件做出了贡献。

贡献者

更新日志

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.