ceinture-culturelle/template-parts/content.php
2025-01-10 15:06:39 +01:00

48 lines
1.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
if (is_front_page() && is_user_logged_in()):
// Add event
get_template_part(
'template-parts/events-add',
null
);
//Les events
get_template_part(
'template-parts/events-display',
null
);
else:
?>
<div class="form-connection form-add-event hidden opacity-0 transform scale-95 transition-all duration-500 w-4/6 mx-auto bg-light rounded-md mb-8">
<div class="w-4/6 mx-auto py-6">
<h2 class="text-xxl mb-4">Se connecter</h2>
<?php
// Afficher le formulaire de connexion WordPress
$args = array(
'redirect' => home_url(), // URL de redirection après connexion
'form_id' => 'loginform-custom', // ID du formulaire
'label_username' => __('Nom dutilisateur / e-mail'),
'label_password' => __('Mot de passe'),
'label_remember' => __('Se souvenir de moi'),
'label_log_in' => __('Connexion'),
'remember' => true
);
wp_login_form($args);
?>
<p class="lost-password">
<a href="<?php echo esc_url(wp_lostpassword_url()); ?>">Mot de passe oublié ?</a>
</p>
</div>
</div>
<?php
//Les events
get_template_part(
'template-parts/events-display',
null
);
endif;
?>