Forum Replies Created
-
AuthorPosts
-
Having the same problem. Made a child theme ( see the how-to here) and then added this code
//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') ;
as proposed here but it didn’t work.
July 3, 2015 at 2:31 pm in reply to: Logout from WordPress always leads to 404 page not found #468004I post function.php content here as wordpress hast changed the way to make a child theme and almost every solution proposal I found did it the old way.
<?php add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); } function rw_logout ($redirect_to) { $url='/blog/' ; $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') ;
July 3, 2015 at 2:22 pm in reply to: Logout from WordPress always leads to 404 page not found #467994Everthing is fine with the default theme. It seems clearly linked to the bbPress plugin.
- This reply was modified 9 years, 4 months ago by HansHuckebein.
July 3, 2015 at 12:03 pm in reply to: Logout from WordPress always leads to 404 page not found #467933Hey,
tried this as well, but without luck. Do I have to configure bbPress somehow.
June 28, 2015 at 2:34 pm in reply to: Logout from WordPress always leads to 404 page not found #465537Didn’t help.
It seems the description there is outdated.Meanwhile I got a child theme working (as a starting point) but how to proceed from there. Every time I include a function into the functions.php file in the child theme it’s not working anymore.
Here’s what I tried.apply_filters('logout_url', 'my_fixed_wp_logout_url') function my_fixed_wp_logout_url($redirect = '') { $args = array( 'action' => 'logout' ); if ( !empty($redirect) ) { $args['redirect_to'] = urlencode( $redirect ); } $logout_url = add_query_arg($args, site_url('wp-login.php', 'login')); $logout_url = wp_nonce_url( $logout_url, 'log-out' ); return $logout_url; }
June 21, 2015 at 1:51 pm in reply to: Logout from WordPress always leads to 404 page not found #462349Thanks for your quick reply. Deactivating bbPress removed the problem. Any hint on how to continue from here?
-
AuthorPosts