如何向 Wordpress 注册页面添加更多信息?
How do I add more information to Wordpress Registration page?
我想在网站注册页面中添加少量文本,但这听起来很简单,但我遇到了麻烦。该网站使用 BuddyPress 并在 Storefront 主题上运行。
图片显示了我要添加文本的位置。我想这可以从我的 functions.php 内部完成,但不确定如何做到这一点。有什么建议吗?
I would imagine this could be done from inside my functions.php but
unsure how to do this.
是的,没错。
这是一个代码片段,它将添加您在提供的屏幕截图中突出显示的自定义消息。
(HTML 代码只是一个示例;您可以随意编辑 class
,将 P
包装在 DIV
中,等等.)
// 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.
} );
我想在网站注册页面中添加少量文本,但这听起来很简单,但我遇到了麻烦。该网站使用 BuddyPress 并在 Storefront 主题上运行。
图片显示了我要添加文本的位置。我想这可以从我的 functions.php 内部完成,但不确定如何做到这一点。有什么建议吗?
I would imagine this could be done from inside my functions.php but unsure how to do this.
是的,没错。
这是一个代码片段,它将添加您在提供的屏幕截图中突出显示的自定义消息。
(HTML 代码只是一个示例;您可以随意编辑 class
,将 P
包装在 DIV
中,等等.)
// 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.
} );