Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbPress forcing login to view the forum

  • I have been trying to setup a bbPress forum for a while now and everything went very smooth. Now I’ve got a problem that I haven’t found a solution to:

    How do I force a user to log in before they can view any forum content at all? I’ve been thinking about just redirecting to /wp-login.php but how do I implement that into my bbPress forum so it knows that you have logged in?

    I thought this might work but don’t know what file to implement the code into…

    if ( is_user_logged_in() ) {
    //Site code here
    } else {
    header("Location: http://www.site-name.com/wp-login.php");
    exit;
    }

    I am a beginner to this whole webdesign world so bare with me if this question is not complicated at all.

  • You must be logged in to reply to this topic.
Skip to toolbar