When using with Events Calendar AND Events Calendar slug is your home page
-
I ran into an issue when I had a peculiar setup with The Events Calendar. I had set my home page to be the Main Booking Page, which is a setting in the Events Calendar and is a WordPress generated url using the slug assigned to your events (usually “/events/”).
So…with Force Login activated, when you go to the direct URL of the website (https://example.com), you just got a white screen of death. If you went to any other url, like https://example.com/weird/ (even though that URL didn’t exist and would generate a 404 error if you did land on it), then the plugin redirected you properly to the login screen. Oddly, if you tried to go to the main events page or any page associated with The Events Calendar like https://example.com/events/list/, then you still got the white screen of death.
Weird. Took me a while to figure out that I needed my home page to be set to an actual page that existed, and wasn’t a WordPress-generated slug. I created a page, called it home, set it to be the home page and now the plugin works properly by redirecting you automatically to the login url no matter what page on the site you land on…even if it’s the “home” page (which is just the domain e.g. https://example.com). I used the code snippet provided to then redirect logged-in users to the main events page after login.
This isn’t a bug per se, I just thought it might be helpful to someone else if I noted the problem and solution here. I think this issue would crop up if you used any WordPress-generated slug as your home page (I’m sure there are other plugins out there that give you that option).
Holler if I’m not clear.
- The topic ‘When using with Events Calendar AND Events Calendar slug is your home page’ is closed to new replies.