Redirect URL to Post – Chatty Mango https://chattymango.com WordPress Plugins Mon, 22 Apr 2019 13:59:06 +0000 en-US hourly 1 135434061 Redirect URL to Post, Version 0.11: Random With Bias https://chattymango.com/redirect-url-to-post-version-0-11-random-with-bias/?pk_campaign=rss&pk_kwd=redirect-url-to-post-version-0-11-random-with-bias https://chattymango.com/redirect-url-to-post-version-0-11-random-with-bias/?pk_campaign=rss&pk_kwd=redirect-url-to-post-version-0-11-random-with-bias#respond Sun, 24 Mar 2019 15:46:57 +0000 https://chattymango.com/?p=5924 This version of the free WordPress plugin Redirect URL to Post comes with a new feature: You can now pick a random from all posts with a bias on a certain subsample. You determine the subsample as before with the parameters count and (optionally) offset. Normally, the random post would be picked from this subsample. ...

The post Redirect URL to Post, Version 0.11: Random With Bias appeared first on Chatty Mango.

]]>
dice

This version of the free WordPress plugin Redirect URL to Post comes with a new feature: You can now pick a random from all posts with a bias on a certain subsample.

You determine the subsample as before with the parameters count and (optionally) offset. Normally, the random post would be picked from this subsample. If you, however, also use bias, the random post can be any of all posts. Those posts among the subsample will be more likely with a percentage1 as defined in bias.

Examples:

www.example.com/?redirect_to=random&count=10&bias=80

With a probability of 80%, the random post will come from the most recent 10 posts.

www.example.com/?redirect_to=random&count=-10&offset=5&bias=50

With a probability of 50%, the random post will come from the oldest 10 posts, shifted by 5 posts from the end.

Install the plugin from the administration of your site or download it from WordPress.org.

Photo by annca


The post Redirect URL to Post, Version 0.11: Random With Bias appeared first on Chatty Mango.

]]>
https://chattymango.com/redirect-url-to-post-version-0-11-random-with-bias/?pk_campaign=rss&pk_kwd=redirect-url-to-post-version-0-11-random-with-bias/feed/ 0 5924
Redirect URL to Post, Version 0.10: Random From a Subsample https://chattymango.com/redirect-url-to-post-version-0-10-random-from-a-subsample/?pk_campaign=rss&pk_kwd=redirect-url-to-post-version-0-10-random-from-a-subsample https://chattymango.com/redirect-url-to-post-version-0-10-random-from-a-subsample/?pk_campaign=rss&pk_kwd=redirect-url-to-post-version-0-10-random-from-a-subsample#comments Wed, 06 Mar 2019 13:23:06 +0000 https://chattymango.com/?p=5880 This version of the free WordPress plugin Redirect URL to Post comes with a new feature: Until now, the parameter random always picked one out of the entire pool of posts (that match the search criteria). Now you can pick a random post from a subsample. The new parameter count lets you limit the pool ...

The post Redirect URL to Post, Version 0.10: Random From a Subsample appeared first on Chatty Mango.

]]>
Choices - street sign

This version of the free WordPress plugin Redirect URL to Post comes with a new feature: Until now, the parameter random always picked one out of the entire pool of posts (that match the search criteria). Now you can pick a random post from a subsample.

The new parameter count lets you limit the pool of posts to the most recent (count has positive number) or oldest (count has negative number) posts.

Example:

www.example.com/?redirect_to=random&count=20

Here we redirect to a random post among the most recent 20 posts.

The value can also be negative, which means that we count from the opposite side, starting from the oldest posts.

The parameter count can be used together with offset so that you omit some of the posts at the beginning or the end.

www.example.com/?redirect_to=random&count=-10&offset=5

Now we omit the oldest 5 posts and pick a random item from the next 10 oldest posts.

Other Changes

  • I changed the default duration of the cache to 60 seconds. Many users don’t seem to be aware of the existence of caching, so it made sense to turn it on by default. You can still override it with “cache=0”.
  • Random posts are now always determined by PHP, not through the database query. This simplified parts of the code and also shifted the burden from the database to the PHP engine.

Install the plugin from the administration of your site or download it from WordPress.org.

Photo by keepitsurreal

The post Redirect URL to Post, Version 0.10: Random From a Subsample appeared first on Chatty Mango.

]]>
https://chattymango.com/redirect-url-to-post-version-0-10-random-from-a-subsample/?pk_campaign=rss&pk_kwd=redirect-url-to-post-version-0-10-random-from-a-subsample/feed/ 1 5880
Redirect URL to Post, Version 0.9: Go to 2nd, 3rd, etc. Post https://chattymango.com/redirect-url-to-post-version-0-9-go-to-2nd-3rd-etc-post/?pk_campaign=rss&pk_kwd=redirect-url-to-post-version-0-9-go-to-2nd-3rd-etc-post https://chattymango.com/redirect-url-to-post-version-0-9-go-to-2nd-3rd-etc-post/?pk_campaign=rss&pk_kwd=redirect-url-to-post-version-0-9-go-to-2nd-3rd-etc-post#respond Fri, 26 Oct 2018 12:40:14 +0000 https://chattymango.com/?p=5464 The latest version of Redirect URL to Post adds a new feature that has been requested several times by users: Now you can redirect to the 2nd, 3rd, or any later position in the set of posts that match the criteria. Simply use the new parameter offset. Here is one example: This link would redirect ...

The post Redirect URL to Post, Version 0.9: Go to 2nd, 3rd, etc. Post appeared first on Chatty Mango.

]]>
go to 2nd post

The latest version of Redirect URL to Post adds a new feature that has been requested several times by users: Now you can redirect to the 2nd, 3rd, or any later position in the set of posts that match the criteria.

Simply use the new parameter offset. Here is one example:

https://www.example.com?redirect_to=latest&offset=1

This link would redirect to the second latest posts.

You can use it as well for the oldest post. If the offset is too high for the available supply of matching posts, the procedure for “no post found” will be initiated.

This release also adds the parameter suppress_filters. You can find the full changelog here.

Not surprisingly, the update is available from your WordPress backend. And if you don’t find it there, just install it from WordPress.org.

Photo by electricnude, Flickr

The post Redirect URL to Post, Version 0.9: Go to 2nd, 3rd, etc. Post appeared first on Chatty Mango.

]]>
https://chattymango.com/redirect-url-to-post-version-0-9-go-to-2nd-3rd-etc-post/?pk_campaign=rss&pk_kwd=redirect-url-to-post-version-0-9-go-to-2nd-3rd-etc-post/feed/ 0 5464
Redirect URL to Post, Version 0.8: Caching https://chattymango.com/redirect-url-to-post-version-0-8-caching/?pk_campaign=rss&pk_kwd=redirect-url-to-post-version-0-8-caching https://chattymango.com/redirect-url-to-post-version-0-8-caching/?pk_campaign=rss&pk_kwd=redirect-url-to-post-version-0-8-caching#respond Sat, 12 May 2018 17:01:43 +0000 https://chattymango.com/?p=4781 This release of the Redirect URL to Post plugin adds optional caching. The benefit of caching is increased speed and reduced burden on the database engine, particularly when using complicated query parameters or “random” on a huge number of posts. 1. In the URL Add the parameter “&cache=600” to the URL. The number is the ...

The post Redirect URL to Post, Version 0.8: Caching appeared first on Chatty Mango.

]]>

This release of the Redirect URL to Post plugin adds optional caching. The benefit of caching is increased speed and reduced burden on the database engine, particularly when using complicated query parameters or “random” on a huge number of posts.

1. In the URL

Add the parameter “&cache=600” to the URL. The number is the cache lifetime in seconds.

2. In wp-config.php

define('CHATTY_MANGO_RUTP_CACHE', 600 );

If you have debugging enabled, you will also notice some useful messages in the logs.

 

Photo by fabbio

The post Redirect URL to Post, Version 0.8: Caching appeared first on Chatty Mango.

]]>
https://chattymango.com/redirect-url-to-post-version-0-8-caching/?pk_campaign=rss&pk_kwd=redirect-url-to-post-version-0-8-caching/feed/ 0 4781
Redirect URL to Post, Version 0.7: Ignore the Stickiness of Posts https://chattymango.com/redirect-url-to-post-version-0-7-ignore-the-stickiness-of-posts/?pk_campaign=rss&pk_kwd=redirect-url-to-post-version-0-7-ignore-the-stickiness-of-posts https://chattymango.com/redirect-url-to-post-version-0-7-ignore-the-stickiness-of-posts/?pk_campaign=rss&pk_kwd=redirect-url-to-post-version-0-7-ignore-the-stickiness-of-posts#respond Fri, 04 May 2018 10:32:36 +0000 https://chattymango.com/?p=4739 The latest version of Redirect URL to Post improves the behavior when you have sticky posts. By default, WordPress puts sticky posts always on top of all other posts. That means that if you have sticky posts, the redirection always goes to the first of them. Since users expect sticky posts to behave like normal ...

The post Redirect URL to Post, Version 0.7: Ignore the Stickiness of Posts appeared first on Chatty Mango.

]]>
sticky photo

The latest version of Redirect URL to Post improves the behavior when you have sticky posts. By default, WordPress puts sticky posts always on top of all other posts. That means that if you have sticky posts, the redirection always goes to the first of them.

Since users expect sticky posts to behave like normal posts when we determine the target of a redirection, the stickiness of posts is now by default ignored.

If you – for what ever reason – need to prioritize sticky posts, you can use the parameter ignore_sticky_posts with a zero value (“0”) in order to return the stickiness to sticky posts.

Here is an example:

https://www.my-wordpress-site.com/?redirect_to=random&ignore_sticky_posts=0

 

Photo by rawpixel (Pixabay)

The post Redirect URL to Post, Version 0.7: Ignore the Stickiness of Posts appeared first on Chatty Mango.

]]>
https://chattymango.com/redirect-url-to-post-version-0-7-ignore-the-stickiness-of-posts/?pk_campaign=rss&pk_kwd=redirect-url-to-post-version-0-7-ignore-the-stickiness-of-posts/feed/ 0 4739
Redirect URL to Post, Version 0.6: Filter by Relative Dates https://chattymango.com/redirect-url-post-version-0-6-filter-relative-dates/?pk_campaign=rss&pk_kwd=redirect-url-post-version-0-6-filter-relative-dates Fri, 20 Oct 2017 16:24:42 +0000 https://chattymango.com/?p=4003 The latest version of the Redirect to URL plugin adds two new query parameters, namely date_query_before and date_query_after. Both let you narrow down the scope of considered posts by setting a lower and/or an upper time limit. These parameters accept all values that can be understood by strtotime(), including relative formats, like “last monday” or “1 year ago”. ...

The post Redirect URL to Post, Version 0.6: Filter by Relative Dates appeared first on Chatty Mango.

]]>
date photo

The latest version of the Redirect to URL plugin adds two new query parameters, namely date_query_before and date_query_after. Both let you narrow down the scope of considered posts by setting a lower and/or an upper time limit.

These parameters accept all values that can be understood by strtotime(), including relative formats, like “last monday” or “1 year ago”. Now you can choose a random post from the past month, or you show the post with the highest comment count that was published before one year ago.

Please be aware that

  1. you may have to write spaces as “%20”; and
  2. any caching plugin might force a certain set of parameters to redirect always to the same post. In that case simply exclude the query string “redirect_to” from the queries that will be cached.

Check out the description of the syntax for more information. If you like the plugin, please give it a 5-star rating!

Photo by Foto-Rabe

The post Redirect URL to Post, Version 0.6: Filter by Relative Dates appeared first on Chatty Mango.

]]>
4003
Redirect URL to Post: Button and Tracking https://chattymango.com/redirect-url-post-button-tracking/?pk_campaign=rss&pk_kwd=redirect-url-post-button-tracking Sun, 27 Mar 2016 17:24:30 +0000 http://www.christoph-amthor.de/?p=3182 A new version (0.5) is out that comes with two new features: A button can be embedded with a shortcode to go to a random (or latest, …) post. Particularly redirecting to a random post helps to revive old posts and to increase page views – an important factor if you show ads on your ...

The post Redirect URL to Post: Button and Tracking appeared first on Chatty Mango.

]]>
A new version (0.5) is out that comes with two new features:

  1. A button can be embedded with a shortcode to go to a random (or latest, …) post. Particularly redirecting to a random post helps to revive old posts and to increase page views – an important factor if you show ads on your blog.
  2. You can now add some query parameters to the URL (and button) that will be appended to the resulting permalink of the single post. These parameters help you track redirects in your web statistics.

More information can be found in the documentation.

The post Redirect URL to Post: Button and Tracking appeared first on Chatty Mango.

]]>
3182
Both Plugins Updated https://chattymango.com/plugins-updated/?pk_campaign=rss&pk_kwd=plugins-updated Sat, 26 Sep 2015 10:26:21 +0000 http://www.christoph-amthor.de/?p=3120 The Tag Groups plugin and the Redirect URL to Post plugin have both been updated today to new versions: Tag Groups The main change is the option to turn off the tag group filter on the tag admin page. You find that option in the plugin settings. This option is only relevant for a small ...

The post Both Plugins Updated appeared first on Chatty Mango.

]]>
The Tag Groups plugin and the Redirect URL to Post plugin have both been updated today to new versions:

Tag Groups

The main change is the option to turn off the tag group filter on the tag admin page. You find that option in the plugin settings.

This option is only relevant for a small number of users where the plugin conflicts with other plugins and themes. This interference results in user interactions being ignored after page reloads (i.e. some changes after clicking don’t persist after the page has reloaded).

Redirect URL to Post

I added a new parameter (suggested in a review) that enables you to exclude pages or posts by their IDs.

 

Photo by geralt (Pixabay)

 

The post Both Plugins Updated appeared first on Chatty Mango.

]]>
3120
Redirect to Post, Version 0.3 https://chattymango.com/redirect-post-version-0-3/?pk_campaign=rss&pk_kwd=redirect-post-version-0-3 Sat, 04 Jul 2015 11:57:37 +0000 http://www.christoph-amthor.de/?p=2954 This update of the Redirect to Post plugin consists of three parts: Option ‘default_redirect_to’ Until now, the default destination for the case that no post could be found was the blog’s home page (site_url). Now you can choose any other page or post by its ID. If it cannot be found, the home page will ...

The post Redirect to Post, Version 0.3 appeared first on Chatty Mango.

]]>
This update of the Redirect to Post plugin consists of three parts:

Option ‘default_redirect_to’

Until now, the default destination for the case that no post could be found was the blog’s home page (site_url). Now you can choose any other page or post by its ID. If it cannot be found, the home page will be used again.

Criteria ‘has_password’ and ‘tag_id’

More a side-effect of other changes, you can now use the criteria to restrict the search to posts that have (or don’t have) a password and by a tag id.

Bug fix

Certain conditions (depending on the order of filters executed and the interaction of other plugins – such as Jetpack with its CSS module) that were impossible to control from within the plugin could cause the loss of some of the query parameters. The only reliable way was to drop the get_query_var function and instead retrieve and sanitize the parameters “on foot”.

Photo by GotCredit

The post Redirect to Post, Version 0.3 appeared first on Chatty Mango.

]]>
2954
A URL to the Latest Post https://chattymango.com/url-latest-post/?pk_campaign=rss&pk_kwd=url-latest-post Thu, 21 May 2015 09:09:27 +0000 http://www.christoph-amthor.de/?p=2897 After three years I have published now another WordPress plugin: Redirect URL to Post. As before, the reason was that I couldn’t find any other plugin providing what I needed. What I needed was a link that I could use on other sites and that would redirect to the latest post in a particular category. ...

The post A URL to the Latest Post appeared first on Chatty Mango.

]]>
After three years I have published now another WordPress plugin: Redirect URL to Post. As before, the reason was that I couldn’t find any other plugin providing what I needed.

What I needed was a link that I could use on other sites and that would redirect to the latest post in a particular category. To be more concrete, I pulled the latest post of a blog to a weekly Mailchimp newsletter. Naturally readers of the newsletter should be taken to the full post by clicking on the title or “read more” link. But even after hours of trying, I did not manage to retrieve the post’s permalink with Mailchimp’s shortcodes.1 So instead I used the link to the entire list of posts of that category – better all than nothing – and readers would from there have to click on to the latest post. Then, however, I realized that it would be very handy to have a special URL that would automatically redirect to the latest post so that I wouldn’t have to worry about updating that link.

This idea resulted in the appended parameter “redirect_to” and the required category ID:

www.ecoburma.com/?redirect_to=latest&cat=151

… which can be translated to:

Redirect to the currently latest post on www.ecoburma.com in the category with the ID 159 (i.e. “blog”).

Additionally to “latest” (or “last”), I implemented also “oldest” (or “first”), “random” and “custom”. “Custom” means that the order is not determined by the date of publishing or a (pseudo) random order but by what you specify with an additional “orderby” parameter. So now you can automatically link to the post with, say, the highest number of comments.

There are numerous other plugins that show a list of latest posts, using shortcodes, or that display them in a widget. What I needed, however, was to make them directly accessible through an URL, and to display the single post rather than a list.

Naturally, this plugin doesn’t need any persistent settings and therefore there is no settings page in the admin back end. It is actually quite simple and doesn’t even change anything in the database.

The plugin already has its own page where I will update all related information.

Now I am curious if it might be useful for anyone else too.

[hr]

The post A URL to the Latest Post appeared first on Chatty Mango.

]]>
2897