如何向Wordpress注册页面添加更多信息?

如何向Wordpress注册页面添加更多信息?

问题描述:

I am wanting to add a small amount of text to the websites registration page, but as simple as this may sound I am having trouble. The website uses BuddyPress & runs on the Storefront Theme.

The image shows where I am wanting to add the text. I would imagine this could be done from inside my functions.php but unsure how to do this. Any advice?

Image where the text needs to be displayed

我想在网站注册页面添加少量文字,但这听起来很简单 我遇到了麻烦。 该网站使用BuddyPress& 在店面主题上运行。 p>

图像显示了我想要添加文本的位置。 我想这可以从我的functions.php中完成,但不确定如何做到这一点。 有什么建议吗? p>

p> div>

I would imagine this could be done from inside my functions.php but unsure how to do this.

Yes, that's correct.

And here's a code snippet that will add the custom message as you highlighted in the screen capture you provided.

(the HTML code is just an example; feel free to edit the class, wrap the P in a DIV, etc.)

// Add custom HTML before the "Complete Sign Up" button in the "Profile Details"
// column on the BuddyPress registration page.
add_action( 'bp_signup_profile_fields', function() {
    // Start editing below.
    ?>
        <p class="notice-check-inbox">
            Please remember to check your emails and confirm registration for a
            <strong>10% discount voucher</strong>!
        </p>
    <?php
    // End editing.
} );