Custom Login w/Modal
-
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…
- The topic ‘Custom Login w/Modal’ is closed to new replies.