WordPress.org

Forums

bbPress
[resolved] Private Forums 404 for Users Not Logged In (3 posts)

  1. EdeeLemonier
    Member
    Posted 10 months ago #

    Hi all,

    I'm trying to understand how private forums work and solve a problem for a client on their private forums.

    Question: My client wants to show only topics, but keep replies hidden from users who are not logged in. Set to private, it all goes 404. What I'm reading here, the bbPress support forums, and elsewhere, this is actually the normal behavior. Is that correct?

    They do not want a 404 page, but a please log in page or a page that says "Sorry, you have to be logged in."

    Solutions tried:
    I disabled all plugins, nothing did it. They have the Members plugin (by Justin Tadlock) installed, and the bbPress Private Forums plugin looks like it's supposed to do what they are looking for, but it didn't.

    I know there's a User Role Editor plugin that will allow me to adjust what certain users can see, and I saw in the bbPress Codex that there are certain capabilities that can be assigned.

    I also know there is a plugin from WPMU that might do the redirect thing.

    Should I just go ahead and get a plugin to do this or is there something I can add in my functions file to make it do what they want?

    Thanks so much in advance - great plugin, btw!

    https://wordpress.org/plugins/bbpress/

  2. Stephen Edgar
    bbPress & Polyglots
    Plugin Author

    Posted 10 months ago #

    Indeed 404'ing for not logged in users is intended and normal behaviour for private topics.

    You are also correct that this is plugin territory, there are numerous 'member' type plugins and 'private forums/topics' reply plugins and I'd suggest taking a look at a few different ones of each, they are all similar but still different, you should be able to find one that meets your needs.

    I'd also suggest you are better off posting on http://bbpress.org/forums/ to get more of a discussion around bbPress issues you have and see what combinations others have used.

    I'm also going to mark this as resolved as continuing this on bbpress.org is preferred.

  3. Sabby
    Member
    Posted 7 months ago #

    Hi there,
    I have the same problem what I did is I have added the below code in 404.php page. This is not properly solved, but I have done it temporary basis. I guess it might help anyone.

    <?php $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
    
    	$actual_link = explode('/',$actual_link);
    	if($actual_link[3]=="forums") { ?>
    	<h2 class="article-title"><?php _e( 'This forum is private. Please login to access this forum' ); ?></h2>
    	<?php } else {?>
    <img src="<?php echo get_template_directory_uri();?>/assets/images/404_image.png"><br>

Reply

You must log in to post.

About this Plugin

  • bbPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags