Redirect Inoperative Link

Posted in

During the affiliate approval process, we enter an “end” date. When that date comes to pass, the account notes “inoperative” below the person’s name in the Manage Affiliates section. If the account is inoperative, I do not want customers to be able to use that link. Is there a way to create a redirect based on that “inoperative” status? Currently, if the link is no longer active, it goes to a blank post. I’d like it to go to a specific page that I created stating, “This link is no longer active.” If you do not have specific redirect code to share, what is the database column “inoperative” is associated with?

3 Responses to Redirect Inoperative Link

  1. Erica Thumma August 6, 2019 at 4:38 pm #

    If I use the link you suggested, I get the same page as if the person tries to use the link and the dates have ended. I believe it’s a 404 message – a white page w/ “No Results Found. The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.”

    Regardless, I still want people to be redirected to a specific page that I created if the affiliate is inoperative. We’re using this for fundraisers. I don’t want supporters potentially thinking they’re making a purchase that will benefit a fundraising group if the fundraising dates are over. Is there a way to do this?

    • Denitsa August 7, 2019 at 12:43 pm #

      Unfortunately, this kind of functionality is not available out-of-the-box – it would require a certain amount of custom coding that is beyond the scope of the support forum. An example solution would include checking the HTTP request – if the parameter is valid (check the expiry date of the affiliate that has the ID from the request), then proceed as normal. Otherwise, use a call to wp_redirect() to redirect to your desired page.


  2. Denitsa August 6, 2019 at 12:30 pm #

    Hello there,
    Normally, when an affiliate expires, no referrals are recorded when their affiliate link is used. However, when an “inoperative” affiliate’s link is visited, it shouldn’t show a different page, so I’m a bit confused as to the blank page you mention that’s currently displayed.
    Would you perhaps describe a more detailed scenario so that I can understand the issue better? E.g., if you have a product page, let’s say, and a user visits an inoperative affiliate’s link to it (say,, what page is shown currently?


We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account