簡體   English   中英

自定義BuddyPress注冊表單模板,而不僅僅是registar.php

[英]Customizing BuddyPress registration form template, not just registar.php

我知道可以對register.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(); 在template-tags.php中被調用: https : //github.com/buddypress/BuddyPress/blob/master/src/bp-templates/bp-nouveau/includes/template-tags.php但是,此文件是直接部分插件,不能以與register.php相同的方式覆蓋

似乎沒有透明,干凈的方式修改表單結構。

看來您必須在bp_nouveau_signup_form();中進行修改。 功能。 如果您使用的是phpstorm,則可以雙擊shift並搜索所有項目文件。

它從您鏈接的文件的2299行開始

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM