Support » Plugin: Force Login » Multisite Subsite Exceptions

  • Resolved celebrantplanner


    Hi – Great plug in, thank you.

    Ive added the following code in my functions.php file to whitelist certain pages on my subsites which need to be made available to public. Each subsite is a different user account and are setup as {subsite}

    The pages are all named the same in each subsite, but the code below isnt allowing anyone to access the ‘’ page without logging in.

    What am I doing wrong or is there a better way to whitelist the pages below for each subsite?

    Thanking you in advance.


    function my_forcelogin_bypass( $bypass ) {

    if ( is_page(‘booking-form’) || is_page(‘NOIM’) || is_page(‘check-availability’) || is_page(‘home-user’) || is_page(‘gallery-user’)|| is_page(‘wording’) ) {
    $bypass = true;
    return $bypass;
    add_filter( ‘v_forcelogin_bypass’, ‘my_forcelogin_bypass’ );

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’ll take that back, it is working! I changed my permalinks so that was the issue, not this plugin 🙂

    Plugin Author Kevin Vess


    Hi– thanks for using Force Login!

    I’m glad you were able to resolve the issue. 🙂

    Also, you could simplify your conditional statement to the following:

    if ( is_page( array( 'booking-form', 'NOIM', 'check-availability', 'home-user', 'gallery-user', 'wording' ) ) ) {
        $bypass = true;

    The is_page() function accepts a Page ID, title, slug, or array of such.

    Be sure to rate and review my plugin to let others know how you like it.


    • This reply was modified 1 year, 2 months ago by Kevin Vess.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multisite Subsite Exceptions’ is closed to new replies.