I have created a custom login page that uses wp_login_form() to create the login form:
<div class="login-form">
<?php
wp_login_form( array(
'remember' => false,
'label_username' => '',
'label_password' => ''
)
);
?>
</div>
I tried to add a simple message to the login form using the default example from the WordPress Codex page about the login form action hook, like this:
add_action( 'login_form', function(){
//Adding the text
?>
<p>You can type a little note to those logging in here.</p>
<?php
});
I literally copy-pasted the last code snippet from the Codex into my custom themes functions.php, to test if it's working.
Now, when I open my custom login page, the text does not appear, but when I open the default login page, the text does appear.
So, does wp_login_form() simply not use the login_form action hook or am I missing something?