Skip to main content
Agency Program Get 2× more leads and save 50% on hosting. Built for agencies ready to grow. Book a call
Random Post Plugin – Redirect URL to Post icon

Random Post Plugin – Redirect URL to Post

v0.25.0
by Christoph · 5.0 (20 reviews)

Automatically redirect to your latest, oldest, random, or other post through a custom URL

5K+ active installs Updated Mar 02, 2025 Tested to 6.7.2 Requires PHP 8.0
Try Demo Download
Pre-installed Ready in ~10s No card
Random Post Plugin – Redirect URL to Post

About Random Post Plugin – Redirect URL to Post

The Redirect URL to Post plugin allows you to redirect your visitors to different posts on your WordPress site based on specific conditions, such as the latest post, the first post, a random post, or the previous/next post. It also provides caching of database results to improve performance. You can configure the plugin through query parameters in the URL.

Changelog

0.25.0

Features

  • New parameter fragment

0.24.0

Features

  • New query parameters to search for custom fields (post meta): meta_key, meta_value, meta_value_num and meta_compare
  • New parameter loop=1 in connection with redirect_to=prev or redirect_to=next to loop back to the last or first post at the end

0.23.0

Features

  • The cache is automatically cleared when a post is updated
  • We don’t reveal the database table prefix in debugging

0.22.0

Features

  • Option to delete the cache (for a particular set of parameters) with cache=-1 (here too, the constant CHATTY_MANGO_RUTP_CACHE takes priority)

Other

  • Added the actual database request to the debugging output

0.21.0

Features

  • Paramter post_type can also be a comma-separated list

0.20.0

Features

  • New parameters: author__in, author__not_in, category__and, category__in, category__not_in, post__in, post__not_in, post_name__in, post_parent, post_parent__in, post_parent__not_in, tag__and, tag__in, tag__not_in, tag_slug__and, tag_slug__in. More information. Wherever WordPress requires an array, you submit the elements as comma-separated list: ...&tag__in=12,15.

0.19.1

Other

  • Added more debug messages for &rutpdebug

0.19.0

Features

  • Define own URL parameters that will be passed through by adding to your wp-config.php define( 'CHATTY_MANGO_RUTP_PASS_THROUGH', 'own1,own2' ); (comma-separated list) to allow …&own1=foo&own2=bar

0.18.3

Bug Fixes

  • Reduced memory usage when not required to retrieve post objects from database

0.18.2

Bug Fixes

  • Fixing parameter ignore_sticky_posts

0.18.1

Bug Fixes

  • Fixing bug introduced in last version (random with bias not working)

0.18.0

Features

  • New parameter lock to redirect a visitor always to the same post for a specified time. Use it with a time in seconds: ...&lock=86400. Particularly useful with random redirects. This works only in the same browser and if the visitor accepts and keeps cookies.

Other

  • Cookies (for each_once and lock) have now by default a domain-wide validity. Switch to separate cookies per directory with the parameter directory_cookie.
  • Please help translate!

Older Versions

The complete changelog is available here.

Try other plugins

Yoast SEO icon

Yoast SEO

4.8 · 10M+ installs

Improve your WordPress SEO: Write better content and have a fully optimized WordPress site using the Yoast SEO…