Make WordPress Core

Opened 3 months ago

Last modified 2 months ago

#64498 new feature request

Add core support for random content redirects

Reported by: annezazu's profile annezazu Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Rewrite Rules Keywords: has-patch needs-unit-tests dev-feedback
Focuses: Cc:

Description

WordPress Core does not include functionality to redirect a request to a randomly selected post or page. This behavior is currently implemented through plugins or custom code. This ticket proposes discussing whether a minimal, opt-in core implementation should exist. Any implementation could rely on existing query and rewrite APIs without introducing user-facing settings or defaults. @matt recently mentioned this as something to consider for 7.0 based on his early plugin here: https://wordpress.org/plugins/random-redirect/

Attachments (1)

64498-random-content-redirect.patch (12.5 KB) - added by solankisoftware 3 months ago.

Download all attachments as: .zip

Change History (5)

#1 @solankisoftware
3 months ago

This would be very useful for content discovery, learning sites, and blogs. A minimal rewrite + redirect approach without UI would be ideal and backward-compatible.

#2 @solankisoftware
3 months ago

  • Keywords has-patch added

#3 @solankisoftware
3 months ago

  • Keywords needs-testing needs-unit-tests added

#4 @sajib1223
2 months ago

  • Keywords dev-feedback added; needs-testing removed
  • Type changed from enhancement to feature request

Latest patch (https://core.trac.wordpress.org/attachment/ticket/64498/64498-random-content-redirect.patch) does not apply cleanly against trunk.

Running "patch:64498" (patch) task
patch unexpectedly ends in middle of line
patch: **** Only garbage was found in the patch input.

Additionally, the patch appears to bundle unrelated docblock/documentation changes alongside the new feature, which should ideally be separated.

Finally, as this is a new functionality, changed the type to feature request.

Note: See TracTickets for help on using tickets.