404 after logout from private forum
-
Hi,
Whenever I logout, using bbpress conections widget, if I’m inside a private forum I get a 404 page.
But I’m at any other page or post or even in a public forum everything goes OK.If at least I could set on the widget a logout url, I will send the user to the home.
Regards,
-
I have exactly the same problem!
Could someone please help???
Thanks!!yes, drop this into your functions file.
This will send users to the /forums/ page whenever they log out -whether private or public forum or on a topic or reply, or anywhere within bbpress. If you logout, you’re saying your done, so taking you back to the index seems a logical place to end up !
You can change the $url to say ‘/home/’ if you want the home page,
//sends the user to $url - in this case '/forums/' function rw_logout ($redirect_to) { $url='/forums/' ; $redirect_to = '<a href="' . wp_logout_url( $url ) . '" class="button logout-link">' . esc_html__( 'Log Out', 'bbpress' ) . '</a>' ; return $redirect_to ; } add_filter ('bbp_get_logout_link', 'rw_logout') ;
Hi!
Is this the file? : bbpress-functions.php
Is this its location? : /public/www/wp-content/plugins/bbpress/templates/defaultWhere exactly do I drop the lines into the file?
thanks for your help!
no the file is one that belongs to your theme called just functions.php
you’ll find it at
wp-content/themes/%yourthemename%/functions.php
where %yourthemename% is the name of your theme.
If you don’t have a child theme, then you should create one, see
It works great, thanks! You’ve been very helpful!!!
great – glad you’re fixed !
- You must be logged in to reply to this topic.