Forum Replies Created
-
In reply to: Get permalink of forums root?
Hi Pascal,
Thanks for replying. It seems that the bbp_form_option() function is not available where I’m trying to get the value, but it’s basically a wrapper for get_option() so I can use that. Also, I was trying to grab the forum root slug, so the following has worked for me:
home_url(get_option( '_bbp_root_slug', 'forums' ));Thanks for pointing me in the right direction.
Salut,
MarcIn reply to: Admin Login redirects me to site front-endHere’s a filter that will redirect admins and editors to the admin panel after login.
add_filter('bbp_redirect_login', 'custom_bbp_redirect_login', 10, 3); function custom_bbp_redirect_login($url, $raw_url, $user){ if ( !empty($user) && !empty($user->roles) && (in_array( 'administrator', (array)$user->roles ) || in_array( 'editor', (array)$user->roles )) ) { return get_admin_url(); } return $url; }In reply to: Admin Login redirects me to site front-endHi. I realize this is an ancient thread but I came across this problem today. domain.com/wp-login.php redirects to the homepage after successful login instead of the admin panel. domain.com/wp-admin redirects to the admin panel because of the automatic addition of the “redirect_to” variable to the URL.
WP 4.4.2
bbpress v2.5.8
Theme: twentyeleven