I've created a custom template for a custom theme, I need to show the vue app that will manage the front end only to logged users. I've used this code inside my functions.php file and it's supposed that I will have a custom login form.
functions.php
<?php
/*
* Form customizzato per Login sito OH
*/
function custom_login_form(){
?>
<style type="text/css">
body {
background-color: #fff !important;
}
#login h1 a {
background-image: url('...');
background-size: contain;
height: 86px;
width: 320px;
background-position: center center;
background-repeat: no-repeat;
}
#loginform {
border-radius: 5% !important;
}
#nav {
display: none !important;
}
#backtoblog a {
display: none !important;
}
#language-switcher {
display: none !important;
}
</style>
<?php
}
add_action('login_enqueue_scripts', 'custom_login_form');
?>
app.php template file
<?php
/*
* Template name: App
*/
wp_head();
if( is_user_logged_in() ) {
?>
<div id="app"></div>
<?php
} else {
wp_login_form();
}
wp_footer();
?>
Is there something wrong in the code or I need to pass params to wp_login_form()
?