[wp-hackers] Page Redirect from Shortcode
gxxaxx at gmail.com
Thu Oct 6 16:03:17 UTC 2011
On Thu, Oct 6, 2011 at 7:07 AM, Erick Hitter <ehitter at gmail.com> wrote:
> I'd also recommend that you look at the External Permalinks Redux (
> http://wordpress.org/extend/plugins/external-permalinks-redux/) and Page
> Links To (http://wordpress.org/extend/plugins/page-links-to/) plugins.
> Both allow you to specify a URL to redirect a post or page to. External
> Permalinks Redux also works with custom post types.
> Full disclosure: I'm the author of External Permalinks Redux.
Thanks for the mention these two plugins. We currently use the
page-links-to. Will have to take a look at the external permalinks
The page-links-to plugin does its job well. I just need a means to
insert code that will test on a cookie and if the cookie is present
NOT redirect. Or if cookie is missing redirect.
Examining the External Permalinks Redux code it looks like I can hook
into the "get_post_metadata" filter for my test. Then return an array
with element 0 = "" if I want to not allow the redirect to go through.
I will definitely look into this arrangement.
p.s. your code is nicely commented. Is that an example of wordpress
suggested best practices for documenting functions? It looks very much
like the required format we used at Cisco in the java team I was
More information about the wp-hackers