自定义BuddyPress注册表单模板,而不仅仅是注册.php



我知道可以对寄存器进行一般修改.php,但它仍然没有以任何有意义的方式提供对输入或标签的直接访问。我想添加额外的块以更好地组织字段组。当前使用 BP 3.2.0

基本上BP允许修改它周围的元素。

例如 (https://github.com/buddypress/BuddyPress/blob/master/src/bp-templates/bp-nouveau/buddypress/members/register.php(:

<div class="register-section default-profile" id="basic-details-section">
<?php /***** Basic Account Details ******/ ?>
<h2 class="bp-heading"><?php esc_html_e( 'Account Details', 'buddypress' ); ?></h2>
<?php bp_nouveau_signup_form(); ?>
</div><!-- #basic-details-section -->

bp_nouveau_signup_form((;在模板标签中调用.php: https://github.com/buddypress/BuddyPress/blob/master/src/bp-templates/bp-nouveau/includes/template-tags.php 但是,此文件是插件的直接部分,不能以与寄存器相同的方式覆盖.php

似乎没有一种透明和干净的方式来修改表单结构。

似乎您必须在 bp_nouveau_signup_form((; 函数中对其进行修改。如果你使用的是phpstorm,你可以双击shift并搜索它的所有项目文件。

它从您链接的文件的第 2299 行开始

相关内容

最新更新