Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在BuddyBoss和/或BuddyPress中编辑用户配置文件内容_Php_Wordpress_Buddypress_User Profile - Fatal编程技术网

Php 在BuddyBoss和/或BuddyPress中编辑用户配置文件内容

Php 在BuddyBoss和/或BuddyPress中编辑用户配置文件内容,php,wordpress,buddypress,user-profile,Php,Wordpress,Buddypress,User Profile,我正在尝试从用户配置文件中删除“通知”、“组”、“消息”和“设置” 我该如何移除它们 请查看以下内容: <?php do_action( 'bp_before_profile_edit_content' ); if ( bp_has_profile( 'profile_group_id=' . bp_get_current_profile_group_id() ) ) : while ( bp_profile_groups() ) : bp_the_profile_group()

我正在尝试从用户配置文件中删除“通知”、“组”、“消息”和“设置”

我该如何移除它们

请查看以下内容:

<?php do_action( 'bp_before_profile_edit_content' );

if ( bp_has_profile( 'profile_group_id=' . bp_get_current_profile_group_id() ) ) :
    while ( bp_profile_groups() ) : bp_the_profile_group(); ?>

<form action="<?php bp_the_profile_group_edit_form_action(); ?>" method="post" id="profile-edit-form" class="standard-form <?php bp_the_profile_group_slug(); ?>">

    <?php do_action( 'bp_before_profile_field_content' ); ?>

        <h4><?php printf( __( "Editing '%s' Profile Group", "buddypress" ), bp_get_the_profile_group_name() ); ?></h4>

        <ul class="button-nav">

            <?php bp_profile_group_tabs(); ?>

        </ul>

        <div class="clear"></div>

        <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>

            <div<?php bp_field_css_class( 'editfield' ); ?>>

                <?php
                $field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() );
                $field_type->edit_field_html();

                do_action( 'bp_custom_profile_edit_fields_pre_visibility' );
                ?>

                <?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?>
                    <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
                        <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> <a href="#" class="visibility-toggle-link"><?php _e( 'Change', 'buddypress' ); ?></a>
                    </p>

                    <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>">
                        <fieldset>
                            <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend>

                            <?php bp_profile_visibility_radio_buttons() ?>

                        </fieldset>
                        <a class="field-visibility-settings-close" href="#"><?php _e( 'Close', 'buddypress' ) ?></a>
                    </div>
                <?php else : ?>
                    <div class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
                        <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?>
                    </div>
                <?php endif ?>

                <p class="description"><?php bp_the_profile_field_description(); ?></p>
            </div>

            <?php do_action( 'bp_custom_profile_edit_fields' ); ?>

        <?php endwhile; ?>

    <?php do_action( 'bp_after_profile_field_content' ); ?>

    <div class="submit">
        <input type="submit" name="profile-group-edit-submit" id="profile-group-edit-submit" value="<?php esc_attr_e( 'Save Changes', 'buddypress' ); ?> " />
    </div>

    <input type="hidden" name="field_ids" id="field_ids" value="<?php bp_the_profile_group_field_ids(); ?>" />

    <?php wp_nonce_field( 'bp_xprofile_edit' ); ?>

</form>

<?php endwhile; endif; ?>

<?php do_action( 'bp_after_profile_edit_content' ); ?>

>

尝试:

尝试:


我在edit.php中找不到这个。我只是复制并粘贴到它吗?不。粘贴到你的主题/功能。phpGotcha。我的完整代码现在已更新。无论如何,我只是编辑了edit.php文件?我在edit.php中找不到这个文件。我只是复制并粘贴到它吗?不。粘贴到你的主题/功能。phpGotcha。我的完整代码现在已更新。不管怎样,我只是编辑edit.php文件?
function evin_remove_nav() {    

    bp_core_remove_nav_item( 'messages' );
    //etc  

}
add_action( 'bp_ready', 'evin_remove_nav', 10 );