- This topic has 2 replies, 2 voices, and was last updated 8 years, 9 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › WP Affiliate Tweaks › I want to create pages only logged in affiliates can see
Tagged: affiliate login
So I’ve figured out programatically how to make this work using php in my wordpress page. I’m using the insert php plugin to do this.
in short this code will do the trick :
[insert_php]
$referrer = $_COOKIE['login_cookie_for_affiliate'];
if ($referrer != ""){
echo "Hi $referrer, thanks for logging in! ";
echo 'MY CUSTOM PAGE CONTENT';
}
else{
echo '<br><b>Affiliate login not detected.</b> Please note - you must be logged in to use this form. Please <a href="/affiliate-portal/">log in here</a> and return to this page before attempting to view this page.';
}
[/insert_php]
‘
however – I just need to know what the login cookie name is for an affiliate is so I can lock it appropriately.
Thanks!
No cookies required…
https://support.tipsandtricks-hq.com/forums/topic/global-logged-in-variable
awesome – thanks. This is cleaner than what I had.