WordPress.org

Support

Support » How-To and Troubleshooting » template_redirect and shortcodes

template_redirect and shortcodes

  • I’m using shortcodes. Based on if a shortcode is in the code I want to use a different template (all for custom post types)

    Now I assume that my action hooks ‘template_redirect’ has passed by the the time add_shortcode runs?

    Is there an easy way to trigger a new template only if a shortcdoe is found?

Viewing 1 replies (of 1 total)
  • @lerizzle have you considered using a custom page template that the user can select instead of using a short-code at all?

    It would of course depend a bit on how you are using the short-codes. Perhaps a little more detail would help us find a workable solution.

Viewing 1 replies (of 1 total)
  • The topic ‘template_redirect and shortcodes’ is closed to new replies.