Redirect function for plugin (3 posts)

  1. rohanpawale
    Posted 5 years ago #

    I have made a plugin which lets people add Google+1 feature to their blog, which is working fine.

    Now I want to add another feature in it which will redirect people to a URL of the site owners choice after someone has given them a vote up using the button. Basically they can notify the visitors that they will get a goody when they vote up the +1 button and will be redirected to their download page as soon as they click on the vote button. Basically a "BRIBE" script.

    Now there are various forms of logic to implement this 'bribe' feature(basically an onclick redirect) but I would like to know the best and easiest way to accomplish it. I am trying to download various redirect related plugins to study the code but all of them are the 301 permanent URL redirect plugins which I don't want. Can you help me with the redirect script knowing the requirements of the plugin or atleast direct me to a resource that will let me use it in my plugin?

    Thanks in advance for any responses :)

  2. Gerhard Potgieter
    Posted 5 years ago #

    Have a look at the wp_redirect() function, it takes url and type of redirect as parameters.

  3. rohanpawale
    Posted 5 years ago #

    Perfect that was what I was looking for!

    apart from that, I might need a Onclick function or something similar to that so that I can redirect people after they click on the google+1 button... any help in that regard?

Topic Closed

This topic has been closed to new replies.

About this Topic