Restrict Users To Access the Home Page

This tip will work when someone do not want to show the Home Page of his site. Whenever a user try to access the Home Page he will land on his dashboard.

Paste the below code in wp-admin > Plugins > Editor > Select WPLMS Customizer Plugin > wplms-customizer.php


function redirect_user_to_dashboard(){

if(is_front_page() && is_user_logged_in()){

global $current_user;

$user_id = get_current_user_id();






Was this article helpful?

Related Articles

Leave A Comment?