如何在登录按钮下添加HTML?

时间:2016-03-16 12:17:50

标签: php wordpress wordpress-plugin

login_form操作引用的示例在密码框下方添加了一个注释或一些文本:

add_action( 'login_form', 'login_extra_note' );

function login_extra_note() {

    //Adding the text

    ?>
    <p>You can type a little note to those logging in here.</p>

    <?php
}

screenshot

如何在登录按钮下添加节点?结果应如下所示:

enter image description here

1 个答案:

答案 0 :(得分:1)

如果您view the source for where this hook is defined,您会注意到您没有找到您正在寻找的内容。

因此,您需要使用CSS或JS破解外观,或者(建议使用build a custom login form使用wp_login_form();