Support » Plugin: Force Login » Force Login with Site using buddypress plugin

Viewing 4 replies - 1 through 4 (of 4 total)
  • The theme is a word press theme as well.

    Plugin Author Kevin Vess

    (@kevinvess)

    Hi– thanks for using Force Login!

    Force Login was built to work with the default WordPress login, lost-password, and register screens.

    You will need to use the BuddyPress Conditional Tags to specify what BuddyPress pages you want Force Login to allow visitors.

    For example:

    /**
     * Bypass Force Login to allow for exceptions.
     *
     * @param bool $bypass Whether to disable Force Login. Default false.
     * @return bool
     */
    function my_forcelogin_bypass( $bypass ) {
      // add exception for BuddyPress URLs
      if ( function_exists( 'bp_is_register_page' ) ) {
        if ( bp_is_register_page() || bp_is_activation_page() ) {
          $bypass = true;
        }
      }
      return $bypass;
    }
    add_filter( 'v_forcelogin_bypass', 'my_forcelogin_bypass' );

    Kevin,

    I tried adding the code above to the function.php and it seems that the register form still won’t open up due to buddy press. An;y idea why this may be?

    Plugin Author Kevin Vess

    (@kevinvess)

    Unfortunately I can’t know why it’s not working without inspecting and troubleshooting your site.

    Have you tried disabling all other plugins and enabling them one at a time to test for a plugin conflict? Or switching to a twenty-something theme to test if your theme is the cause of it?

    Let me know if you figure out the cause of your issue.

    Good luck!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.