Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom Login w/Modal

  • Avatar of radleaf
    radleaf
    Participant

    @radleaf

    Hey guys/gals I’m using buddypress and would like to create a custom login on the front page. I’ve add this code to my bp-custom:

    define(‘BP_REGISTER_SLUG’, ‘sburegister’);

    function sbu_restrict_access() {
    global $bp, $bp_unfiltered_uri;
    if (!is_user_logged_in() && (BP_MEMBERS_SLUG == $bp_unfiltered_uri[0]
    || BP_GROUPS_SLUG == $bp->current_component || BP_BLOGS_SLUG == $bp->current_component || BP_ACTIVITY_SLUG == $bp->current_component)) {

    bp_core_redirect(get_option(‘home’) . “/register”);
    }
    }

    add_action(‘wp’, ‘sbu_restrict_access’, 3);

    And also created a front_page.php and in doing so I added .modal which is part of boostrap a js library to make the front page login pop out which works okay I think.
    However, when some hits the ‘create an account’ link I wanted the registration form to pop out using the .modal() js but when I click the link it takes me to stepbusinessup.com/home then displays the registration page I want that to happen on the front page…

Viewing 1 replies (of 1 total)
  • Avatar of Henry
    Henry
    Participant

    @henrywright-1

    I had the same problem as you. Not only is the ‘create an account’ link problematic but also the ‘lost password’ link takes you away from the Bootstrap modal. I felt it was like a juggling act to get everything working together so opted to use the standard BP login and registration pages.

    Be good to hear if anyone has a solution to radleaf’s post above.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.