Title: Bypass Force Login code question
Last modified: January 24, 2019

---

# Bypass Force Login code question

 *  Resolved [nkoltys](https://wordpress.org/support/users/nkoltys/)
 * (@nkoltys)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/bypass-force-login-code-question/)
 * To the provided Bypass Login code, I added only the below absolute URL to bypass
   login prompt when the sweetbriar.org/calendar. Is syntax or location correct?
   This code was then inserted to the bottom of the existing functions.php w/in 
   my Activation theme folder. When testing the URL in the browser nothing rendered.
   ———————————————-/***
   Bypass Force Login to allow for exceptions. * * [@param](https://wordpress.org/support/users/param/)
   bool $bypass Whether to disable Force Login. Default false. * [@return](https://wordpress.org/support/users/return/)
   bool */ function my_forcelogin_bypass( $bypass ) { if ( [https://sweetbriarfarms.org/calendar/](https://sweetbriarfarms.org/calendar/)){
   $bypass = true; } return $bypass; } add_filter( ‘v_forcelogin_bypass’, ‘my_forcelogin_bypass’);——————————————

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * (@kevinvess)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/bypass-force-login-code-question/#post-11126999)
 * Hi, thanks for using Force Login!
 * Your syntax is wrong, specifically the conditional statement. Change it to the
   following:
 *     ```
       if ( is_page( 'calendar' ) ) {
       ```
   
 *  Thread Starter [nkoltys](https://wordpress.org/support/users/nkoltys/)
 * (@nkoltys)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/bypass-force-login-code-question/#post-11127218)
 * Thank you for your quick reply, much appreciated.
 * I made your edit but not in the Theme’s functions.php instead in the plugin’s
   WP-Force-Login.php. If this is not best practice, please advise.
 * It appears to be working.
 *  Plugin Author [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * (@kevinvess)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/bypass-force-login-code-question/#post-11127453)
 * Hi, I’m glad you got it working!
 * However, editing plugin files is not best practice. If you update the plugin,
   all of your custom changes will be lost.
 * It’s better to apply custom changes through hooks and filters via your theme’s
   functions.php file or a custom plugin of your own.
 * Be sure to [rate and review](https://wordpress.org/support/plugin/wp-force-login/reviews/#new-post)
   my plugin to let others know how you like it.
 * Thanks for using Force Login!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Bypass Force Login code question’ is closed to new replies.

 * ![](https://ps.w.org/wp-force-login/assets/icon.svg?rev=1904031)
 * [Force Login](https://wordpress.org/plugins/wp-force-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-force-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-force-login/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-force-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-force-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-force-login/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/bypass-force-login-code-question/#post-11127453)
 * Status: resolved