Skip to:
Content
Pages
Categories
Search
Top
Bottom

Buddypress Registration shortcode


  • Bharat
    Participant

    @chavodbharat

    Hello Buddybpress team

    I want to create custom short code for buddypress registration from and i have follow below thing .
    1) plugin -> bp-custom.php file in I’ve add copy register.php file code and create short code using same register page code but when i place that shortcode other pages not working .

    Is there any solution for that ?

    Here my code :

    function buddy_register_short(){
    global $wpdb,$bp;

    ?>

    <div class=”bs-bp-container-reg custom-register-section”>
    <div id=”buddypress” class=”buddypress-wrap extended-default-reg”>
    <div id=”register-page”class=”page register-page”>
    <form action=”” name=”signup_form” id=”signup_form” class=”standard-form” method=”post” enctype=”multipart/form-data”>
    <div class=”register-section” id=”basic-details-section”>

    <?php /***** Basic Account Details ******/ ?>

    <div class=”form-group”>
    <label for=”signup_username”><?php _e( ‘Username’, ‘buddypress’ ); ?> <?php _e( ‘(required)’, ‘buddypress’ ); ?></label>
    <?php

    /**
    * Fires and displays any member registration username errors.
    *
    * @since 1.1.0
    */
    do_action( ‘bp_signup_username_errors’ ); ?>
    <input type=”text” name=”signup_username” id=”signup_username” value=”<?php bp_signup_username_value(); ?>” <?php bp_form_field_attributes( ‘username’ ); ?>/>
    </div>

    <div class=”form-group”>
    <label for=”signup_email”><?php _e( ‘Email Address’, ‘buddypress’ ); ?> <?php _e( ‘(required)’, ‘buddypress’ ); ?></label>
    <?php

    /**
    * Fires and displays any member registration email errors.
    *
    * @since 1.1.0
    */
    do_action( ‘bp_signup_email_errors’ ); ?>
    <input type=”email” name=”signup_email” id=”signup_email” value=”<?php bp_signup_email_value(); ?>” <?php bp_form_field_attributes( ’email’ ); ?>/>
    </div>

    <div class=”form-group”>
    <label for=”signup_password”><?php _e( ‘Choose a Password’, ‘buddypress’ ); ?> <?php _e( ‘(required)’, ‘buddypress’ ); ?></label>
    <?php

    /**
    * Fires and displays any member registration password errors.
    *
    * @since 1.1.0
    */
    do_action( ‘bp_signup_password_errors’ ); ?>
    <input type=”password” name=”signup_password” id=”signup_password” value=”” class=”password-entry” <?php bp_form_field_attributes( ‘password’ ); ?>/>
    <div id=”pass-strength-result”></div>
    </div>

    <div class=”form-group”>
    <label for=”signup_password_confirm”><?php _e( ‘Confirm Password’, ‘buddypress’ ); ?> <?php _e( ‘(required)’, ‘buddypress’ ); ?></label>
    <?php

    /**
    * Fires and displays any member registration password confirmation errors.
    *
    * @since 1.1.0
    */
    do_action( ‘bp_signup_password_confirm_errors’ ); ?>
    <input type=”password” name=”signup_password_confirm” id=”signup_password_confirm” value=”” class=”password-entry-confirm” <?php bp_form_field_attributes( ‘password’ ); ?>/>
    </div>

    <?php

    /**
    * Fires and displays any extra member registration details fields.
    *
    * @since 1.9.0
    */
    do_action( ‘bp_account_details_fields’ ); ?>

    </div><!– #basic-details-section –>
    <?php

    /**
    * Fires after the display of member registration account details fields.
    *
    * @since 1.1.0
    */
    do_action( ‘bp_after_account_details_fields’ ); ?>

    <?php
    /**
    * BuddyPress – Members
    *
    * @package BuddyPress
    * @subpackage bp-legacy
    * @version 3.0.0
    */

    /**
    * Fires before the display of the registration submit buttons.
    *
    * @since 1.1.0
    */
    do_action( ‘bp_before_registration_submit_buttons’ ); ?>

    <div class=”submit text-right”>
    <input type=”submit” class=”btn-primary” name=”signup_submit” id=”signup_submit” value=”<?php esc_attr_e( ‘Complete Sign Up’, ‘buddypress’ ); ?>” />
    </div>

    <?php

    /**
    * Fires after the display of the registration submit buttons.
    *
    * @since 1.1.0
    */
    do_action( ‘bp_after_registration_submit_buttons’ ); ?>

    <?php wp_nonce_field( ‘bp_new_signup’ ); ?>
    </form>
    </div>
    </div>
    </div>
    <?php
    }
    add_shortcode( ‘buddypress_register’, ‘buddy_register_short’);

    ?>

    Thanks
    Chavod

  • You must be logged in to reply to this topic.
Skip to toolbar