One of the banes of sites using the WordPress BBPress forums, which is otherwise a great plugin, is that when forum members log in to the BBPress forums using the BBPress login link, they have to immediately log in a second time, because once logging in with BBPress, they are immediately redirected to the WordPress log in, even though for the average forum user, the credentials will be identical! What you want is a way that a user can sign in one single time, using a single login that gets them into both BBPress and their WordPress account at the same time. It’s possible with a couple of plugins, and we’re going to tell you how!
(To explain the issue further, if you don’t want to allow unregistered guests to post to your BBPress forums anonymously, then they need to register for your BBPress forums. The act of registering through BBPress also creates a WordPress user account for them at the same time, and this is why when they log into their BBPress member account, they also have to log secondarily into the WordPress account.)
Making a user log in twice makes no sense, and is off-putting to the user who just wants to log in, get to the forums, and start reading and posting, without having to log in a second time through the WordPress login page as well.
In the best case scenario, your users will be slightly confused, or irked (or both) at having to log in twice in rapid succession. In the worst case scenario, they will become so irritated and annoyed that they will simply stop using your forums. Exactly the opposite of what you want them to do!
But here’s a little secret: If they are already logged into WordPress, they don’t have to log into BBPress as well, they will already be logged in to both.
The Internet Patrol is completely free, and reader-supported. Your tips via CashApp, Venmo, or Paypal are appreciated! Receipts will come from ISIPP.
So, the trick is to have your forum members not use the BBPress forums login at all, but to instead substitute the WordPress login, while making it appear to be the forums login (so as not to confuse your forum users).
Here’s how to do it.
How to Create a Single Sign In System for Users to Log in to BBPress Forums
First of all, you have probably already tried, and maybe are even still using, the BBPress login widget that comes with BBPress. After all, why wouldn’t you? (Because it requires your users to log in to WordPress after they log in to BBPress, that’s why!)
BBPress Login Widget
Or, perhaps you are using the Forum Login menu along with a menu widget.
BBPress Forum Login Menu
Either way, here is what to do:
1. Install these three plugins:
BAW Login / Logout Menu will give you the ability to have your members log in to WordPress directly.
Theme My Login will make it so that where your members log in will look like part of the forums, instead of the standard WordPress login page.
IMPORTANT NOTE! If you have a cache plugin you will need to disable it; there is a known issue with Theme My Login and caching plugins that case the Password Reset to not work otherwise.
WPS Hide Login allows you to call the login page something other than wp-login.php (which also makes your site much more secure).
Once you have installed and activated these plugins, move on to Step 2.
2. Go to Appearance -> Widgets, and if the BBPress Login Widget is enabled, remove it.
Remove the BBPress Login Widget
3. Go to the admin panel for Menus (Appearance -> Menus)
4. Edit the ‘Forum Login’ menu.
Remove the Log In menu option that says ‘Page’, and that looks like this:
Leave everything else, including Forums, New Member Registration, and Lost Password.
The only thing you will be replacing is the Log In option.
5. Look over at the list to the left of your menu, at the different things you can add to your menu. Usually the first options are pages (links to pages) that you can add to your menu. In fact, all of the pre-installed BBPress options (log in, log out, register, etc.) are actually pages. Including the Log In page that you just removed.
Go down to the bottom of the list, and click on Login/Logout links. This is the BAW Login / Logout Menu plugin that you installed.
When you click on the down arrow on the Login/Logout links section, the section expands to give you the following options:
Check ‘Log In | Log Out’ and add it to the menu. Do not add any of the other options.
SAVE YOUR MENU!
6. Go back to the Widgets section (Appearance -> Widgets).
Find the widget called “Custom Menu”:
Drag the Custom Menu widget to your sidebar, select ‘Forum Login’ from the ‘Select Menu:’ dropdown, give your widget a name, and hit ‘Save’.
This is what your members (users) see:
And when they click on Member Log In, they are magically taken to a log in page that looks just like the rest of your site (instead of the generic WordPress login) thanks to the Theme My Login plugin.
Your Users See a Log In Page that Matches Your Site
What they don’t see is this:
Now, you could stop here. But we strongly recommend you take one last step:
7. Go to your Plugins admin area, and find WPS Hide Login
Click on Settings, which will take you to your general settings page (you can also just go to the settings page; the plugin has added the WPS Hide Login setting to the bottom of your general settings page).
Fill in the blank with whatever you want the secret name of your login URL to be (instead of wp-login.php). Your secret name can be whatever you want, but it is what your members will see when they hover over the login link, and also at the top of the login page, so you want to make it something that makes sense, like ‘members’ or ‘login’ or pretty much anything else which will make more sense to them than seeing ‘wp-login.php’.
Click on ‘Save Changes’.
Be sure to write down the new login URL that you just created, because now going to wp-login.php won’t work (which is why it’s also more secure, because hackers look for wp-login.php).
That’s it! You don’t have to do anything else! You don’t even have to tell the menu widget that you have a new login URL, the plugins do it all for you!
Now your users can log in through your BBPress forums (so far as they know ;-) ), and they will only have to use that one login!
The Internet Patrol is completely free, and reader-supported. Your tips via CashApp, Venmo, or Paypal are appreciated! Receipts will come from ISIPP.
thank you for the article!… please help me, is there a way to do this without disabling the cache plugin, it is very important in my website