WordPress.org

Support

Support » How-To and Troubleshooting » template_redirect: How do I get the permalink?

template_redirect: How do I get the permalink?

  • I am using the Kimili Flashembed plugin to integrate some flash movies. I want to display a message when the feed is viewed that, if the feed doesn’t show up, you should visit the original post (which is linked to).

    Showing the message is not a problem using “if(is_feed())”, but I cannot retrieve the permalink with “get_permalink()”.

    I suppose this is because of the action hook that is used, “template_redirect”. I guess the functions mentioned are not yet initiated at that point.

    Does anyone know how I can retrieve the permalink within the template_redirect hook so that I can link to the post?

    Thanks in advance!

Viewing 1 replies (of 1 total)
  • Ooops… I have just seen that I posted a similar problem already (7 months ago, that is), but it is still kind of different:

    http://wordpress.org/support/topic/183389

    I need that permalink -! :’-(

    Or at least a way to put a link to the post, so that “… the original post …” actually leads to the original post.

    Help will be deeply appreciated.

Viewing 1 replies (of 1 total)
  • The topic ‘template_redirect: How do I get the permalink?’ is closed to new replies.
Skip to toolbar