shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php

Redirect Instructors to another page on login instead of their dashboard

The first page that instructors can access when they login is their overview dashboard page, where they can start creating their courses.

If you want your instructors to access another page first on login instead of their dashboard, you can simply add the below code in either of the two options to redirect users to a page you want them to land in after their login.

  • Your child theme’s functions.php file
  • Make use of the Code Snippets add-on
/**
 * Redirect instructors to home page ( or some other page ) on login
 *
 * @param string $redirect_to   Redirect URL
 * @param object $user          WP_User object of the logged in user.
 *
 * @return string               Updated redirect URL.
 *
 * @author Kumar Rajpurohit <[email protected]>
 */
function ir_custom_redirect_instructors_on_login( $redirect_to, $user ) {
    // Redirect to home url ( Change to some other url as necessary )
    $redirect_to = home_url();

    return $redirect_to;
}
add_filter( 'ir_login_redirect_filter', 'ir_custom_redirect_instructors_on_login', 10, 2 );

You can change the $redirect_to variable in the above code to whichever page you want to redirect the instructors to.

Updated on May 7, 2020
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php

Was this article helpful?

shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php
shvsh > /home/1168859.cloudwaysapps.com/rcyqmhwrmv/public_html/docs/wp-content/plugins/ht-knowledge-base/ht-knowledge-base.php

Related Articles