redirect – if not logged in – for some sections
-
None of the redirect plugins (that I can find) work.
Or they aren’t flexible enough.So I’m trying to write a function for child theme/functions.php
I need to redirect users away from some parts of the site – if they are not logged in.
I can use :
is_user_logged_in()
to find out if they are logged in.If they aren’t – any hints on how to find out what section they are in?
For example, sections like: Groups, Members, etcIf they are in a ‘private’ area, then I can send them to the register / login page.
I guess I could use parse_url and some string comparing – but hoping there is a BP native way.
Thx.
- The topic ‘redirect – if not logged in – for some sections’ is closed to new replies.