Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save greenhornet79/67422e3c3b2986d5c3b69e7bf3cdfadd to your computer and use it in GitHub Desktop.
Save greenhornet79/67422e3c3b2986d5c3b69e7bf3cdfadd to your computer and use it in GitHub Desktop.
<?php
add_filter( 'leaky_paywall_login_form_args', 'zeen101_login_referrer_redirect' );
function zeen101_login_referrer_redirect( $args ) {
$referrer = $_SERVER['HTTP_REFERER'];
if ( !$referrer ) {
return $args;
}
$args['redirect'] = $referrer;
return $args;
}
@Aditya94A
Copy link

Where exactly am I supposed to put this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment