I have a wordpress website, its using buddypress and bbpress. I need to hide/redirect all the buddypress and bbpress pages from people who are not logged in. So if someone lands on the members page, profile page or any forum topic it needs to redirect them to the signup page.
I tried maybe 5 plugins, all of them caused issues like 404 errors, not working or just white pages.
The url structure is like this:
www.example.com/members
www.example.com/members/luke
www.example.com/forums
www.example.com/forums/forum/general-chat
Does anyone know how I can do this without a plugin?
you have to modify from within a child theme the profile-loop.php file
On the first line of the file, add
At the end of the file, insert between the last endif and the last do_action this:
Change the div inline style to whatever you need accordingly to your theme. The example fits with bp-default.
If you can not do that, then try this plugin,
plugin
Try this but make sure to change the url to what you want
Try this in your
theme/functions.php
or in bp-custom.php: