Whitelist suddenly not working
-
Had this code set up and working in my functions.php file, then we recently migrated our site to a new hosting company. During that migration, the wp-config file was not migrated with the site, so the code didn’t come over in the functions. I re-added the code to the functions.php from a backup of the site, but the whitelisted URLs are still forcing login. Confused at why this exact code used to work, but on a new server, it doesn’t? Nothing else changed.
/** * Filter Force Login to allow exceptions for specific URLs. * * @param array $whitelist An array of URLs. Must be absolute. * @return array */ function my_forcelogin_whitelist( $whitelist ) { $whitelist[] = 'https://www.advisorsexcel.com/events/'; $whitelist[] = 'https://www.advisorsexcel.com/events/elite-mastermind-registration/'; $whitelist[] = 'https://www.advisorsexcel.com/events/leadership-summit-survey/'; $whitelist[] = 'https://www.advisorsexcel.com/giving-back/'; $whitelist[] = 'https://www.advisorsexcel.com/giving-back/season-of-sharing/'; $whitelist[] = 'https://www.advisorsexcel.com/giving-back/season-of-sharing/faqs/'; $whitelist[] = 'https://www.advisorsexcel.com/giving-back/season-of-sharing/application/'; $whitelist[] = 'https://www.advisorsexcel.com/giving-back/season-of-sharing/season-of-sharing-application-thank-you/'; $whitelist[] = 'https://www.advisorsexcel.com/events/transformation-virtual-registration/'; $whitelist[] = 'https://www.advisorsexcel.com/events/transformation-virtual-registration/?src=Symetra'; $whitelist[] = 'https://www.advisorsexcel.com/events/transformation-virtual-registration/?src=SymetraAmerican'; $whitelist[] = 'https://www.advisorsexcel.com/events/virtual-transformation/?src=join'; $whitelist[] = 'https://www.advisorsexcel.com/events/ae-roadshow/?src=join'; $whitelist[] = 'https://www.advisorsexcel.com/events/wealth-elite-symposium/sponsor/?offer=astor'; $whitelist[] = 'https://www.advisorsexcel.com/events/wealth-elite-symposium/sponsor/?offer=blackrock'; $whitelist[] = 'https://www.advisorsexcel.com/events/wealth-elite-symposium/sponsor/?offer=clark'; $whitelist[] = 'https://www.advisorsexcel.com/events/wealth-elite-symposium/sponsor/?offer=fidelity'; $whitelist[] = 'https://www.advisorsexcel.com/events/wealth-elite-symposium/sponsor/?offer=firsttrust'; $whitelist[] = 'https://www.advisorsexcel.com/events/wealth-elite-symposium/sponsor/?offer=milliman'; $whitelist[] = 'https://www.advisorsexcel.com/events/wealth-elite-symposium/sponsor/?offer=riskalyze'; $whitelist[] = 'https://www.advisorsexcel.com/events/wealth-elite-symposium/sponsor/?offer=state'; $whitelist[] = 'https://www.advisorsexcel.com/events/wealth-elite-symposium/sponsor/?offer=jaforlines'; $whitelist[] = 'https://www.advisorsexcel.com/events/wealth-elite-symposium/sponsor/?offer=wisdom'; $whitelist[] = 'https://www.advisorsexcel.com/events/wealth-elite-symposium/sponsor/?offer=orion'; $whitelist[] = 'https://www.advisorsexcel.com/aecreative/'; return $whitelist; } add_filter( 'v_forcelogin_whitelist', 'my_forcelogin_whitelist' );
The page I need help with: [log in to see the link]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Whitelist suddenly not working’ is closed to new replies.