• Resolved stevenjc

    (@stevenjc)


    Hi,
    Wondering if there’s a way of using the enable private site feature whilst also allowing public access to one or two particular pages by ID?
    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Caseproof

    (@caseproof)

    Hi @stevenjc

    You can try to add this code at the end of your theme’s functions.php file:

    add_filter( 'members_is_private_blog', function( $is_private ) {
      if ( is_page( array( 1909, 2004 ) ) ) {
        return false;
      }
      return $is_private;
    } );

    and replace pages IDs with your own IDs.

    Best

    Thread Starter stevenjc

    (@stevenjc)

    Thanks @caseproof, much appreciated.

    Thread Starter stevenjc

    (@stevenjc)

    Tested and can confirm the function above works perfectly if anyone else is looking to do something similar.
    Marking as resolved, thanks again.

    • This reply was modified 2 years, 6 months ago by stevenjc.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Private site with a public access page?’ is closed to new replies.