Pretty Link Lite
[resolved] ? init or template_redirect' action? (2 posts)

  1. lindaloustarr
    Posted 3 years ago #

    Hi There, just installed pretty link lite to try it on for size, wow if this works how absolutely perfect for what I need!!! Thank you for showing up in my life today :)

    I am just getting things set up, groups, links, tracking etc. & am wondering if you could help me better understand the differences in using either of those two hooks site is using a pretty complex theme (http://breathepossibility.com) "Black Label" & I just want to be sure I'm not going to break anything LOL ~ so where you say the description "Defaults to use WordPress' 'init' action. Init works more reliably for many users but the better option for performance and compatibility is to use the 'template_redirect' action." I am always drawn of course to "better options" :) but if possible would like to know the "why" of it (was that way as a child too drove my parents nuts) LOL

    Thank you for your kind reply :)
    Linda Lou


  2. Blair Williams
    Plugin Author

    Posted 3 years ago #

    If you have a doubt you should just use init ... if you use template_redirect then WordPress has the opportunity to resolve urls before pretty link can redirect. We've found that sometimes -- even if there's no actual slug for something in the URL that WordPress will actually guess a post or page that the link should go to and redirect before Pretty Link can even run. So, the option for using 'template_redirect' is mainly for advanced users who need it hooked there for a specific purpose.

    Hope that helps,


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.