[wp-hackers] Page Redirect from Shortcode

Claude Needham gxxaxx at gmail.com
Thu Oct 6 12:56:52 UTC 2011


On Wed, Oct 5, 2011 at 10:44 PM, Dion Hulse (dd32) <wordpress at dd32.id.au> wrote:
> Shortcodes are parsed/called at display time, by the time the shortcode
> function is called, the header and some posts may/will have printed.
>
> Your only real option is to hook in early on template_redirect (or similar)
> and scan through $wp_query->posts manually looking for the shortcode, and
> handling it there..
>
> A shortcode might not be the best option for what you're trying to achieve?
> what are the reasons you've gone with a shortcode?
>
> On 6 October 2011 16:41, Claude Needham <gxxaxx at gmail.com> wrote:

I'm afraid the reason for using shortcode was not the best reason but
it was a compelling reason.
The owner of the website is technically challenged. They are
comfortable with shortcodes and little else.
I was attempting to use a mechanism they were familiar with.

But, it looks like the shortcode mechanism just plain will not work.

In light of this, what mechanism would be best for this situation?
Post meta? Custom field?

Thanks, this is a new area for me.

Claude


More information about the wp-hackers mailing list