Notifications
Clear all

wpForo 1.x.x [Closed] login to forum instead of wp platform

2 Posts
2 Users
0 Likes
958 Views
Posts: 2
Topic starter
(@zia-zhao)
Active Member
Joined: 5 years ago

I've been searching for information about how to lead users directly to my forum after login. (because mine goes to wordpress dashboard). I found avoid using wp-login.php should fix the problem. However, I don't know how to get rid of  wp-login.php? Is there step by step tutorial? or explanations?

Topic Tags
1 Reply
Posts: 1602
(@anonymous20)
Noble Member
Joined: 8 years ago

You can actually redirect users from WP Login->Dashboard to Home page. Maybe to the forum URL (i haven't tried that).

Put this to your theme's function.php

/* redirect users to front page after login Start */

function redirect_to_front_page() {

global $redirect_to;

if (!isset($_GET['redirect_to'])) {

$redirect_to = get_option('siteurl');

}

}

add_action('login_form', 'redirect_to_front_page');

/* redirect users to front page after login end */