Support » Plugin: Members - Membership & User Role Editor Plugin » Private Site Prevents Privacy Policy Display

  • While using the built-in privacy policy feature of WordPress, we have a small problem with display of the privacy policy, when the Members plugin has the private site enabled.

    On the logon page, the Privacy Policy link appears when this feature is setup in WordPress. However, when you click on the link, you are returned to the logon page, because private site is enabled. It seems important to display the privacy policy before user logon.

    I can override the privacy link inside the site pretty easily. However, in trying to override the WordPress link to our standard policy page, errors about overriding a static variable are returned. There is a feature where you can override the password reset link. I was thinking I could do the same thing with the privacy policy. But, privacy policy doesn’t appear to allow for overrides.

    So, is there a way to except a single page from the private site feature? I’ve tried setting all the pages to require a role. However, this still returns our standard landing page, just with all the text removed, due to the restrictions elsewhere.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can whitelist pages via the members_is_private_page filter hook. Here’s an example of whitelisting the “about” page, for example:

    add_filter( 'members_is_private_page', function( $is_private ) {
    	return is_page( 'about' ) ? false : $is_private;
    } );
    Thread Starter jthNET


    Awesome suggestion, Justin. Thanks!

    I coupled that with the call for the privacy page to produce this code:

    add_filter( 'members_is_private_page', function( $is_private ) {
    	$privacy_policy_page = get_option( 'wp_page_for_privacy_policy' );
    	if ( $privacy_policy_page ) {
    		$permalink = esc_url(get_permalink($privacy_policy_page));
    	return is_page( $privacy_policy_page ) ? false : $is_private;
    } );

    I just had the same problem and wanted to ask where the code must be inserted in.

    Best regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Private Site Prevents Privacy Policy Display’ is closed to new replies.