create custom login page

Question

I’m looking for a way to create a custom login for a wordpress based app. I’m restricting the access to the website to members only and I have this code for now in my index theme file:

<?php
get_header();

if(!is_user_logged_in()){
  auth_redirect();
}
else{
  get_template_part('assets/dashboard');
}

get_footer();
?>

It will take care to redirect the users to the login page if they are not logged in. I want to put it on the index of my theme file, but someone suggested me to use the function file for a better access control.
According to this, I want to create a dedicated bootstrap 4 based login form, but every guide I’ve found use a plugin or custoimze the existing wp login form and it’s not exactly what I want, I want to use a dedicated template part.
Any help will be appreciated

0
, sialfa 2 years 2019-12-25T04:08:10-05:00 0 Answers 107 views 0

Leave an answer

Browse
Browse