Other Parameters

If Nothing Was Found

Add the parameter default_redirect_to where you can specify a default destination if the other criteria return an empty result. It accepts as value the ID of a post or page. If this parameter is omitted or if the post or page with this ID cannot be found, then the default destination is the home page.


Use these parameters for tracking the redirects in your statistics. Supported are Google Analytics (utm_sourceutm_campaign, utm_medium, utm_term and utm_content) and Piwik Matomo (pk_campaign, pk_kwd, pk_source, pk_medium and pk_content).


Redirect to the latest post that uses the tag with the ID 23 and add the campaign identifier “my_link” . If no post uses that tag, go to the post or page with the ID 12.



If you have a busy website with many posts, complicated database queries and particularly finding a random post can decrease performance. For this reason it is recommended to use caching so that the results can be used again for a specified time. The default caching time is 60 seconds.

In most cases we are caching the final post for a given set of parameters. The only exception is “redirect_to=random” where we cache the entire set of posts from which we then pick a random post.

The value is the cache lifetime in seconds. 0 (zero) means off.

There are two ways how you can change the value for caching:

1. URL

Add the parameter cache to the URL.


Redirect to a random post and cache the pool of posts for 120 seconds.


2. wp-config.php

Add the following constant definition to wp-config.php. This constant takes priority over the URL parameter. That means that you can use this way to enforce caching (if you’re afraid a user might disable the cache per URL parameter).

define('CHATTY_MANGO_RUTP_CACHE', 600 );

Suppressing Filters

By default, the plugin tries to suppress filters in order to avoid interference from other plugins. In some cases, however, you might want them to interfere, for example if a multilingual plugin filters the posts by language. In that case just add “suppress_filters=0″ to the URL.

How do you rate this article?