• Resolved Duranic

    (@duranic)


    Your plugin is great, however I need some help with it. One, is there a way I can whitelist pages? We have a support and custom registration page that need to be accessed by users who are not logged in. Please let me know if this is possible.

Viewing 1 replies (of 1 total)
  • I’m working on something similar right now, and I found a way. Here’s a sample function:

    function my_function_makes_page_public()
    {
    	global $post;
    
    	if ( empty( $post ) || 'mypageslug' !== $post->post_name ) return;
    
    	add_filter( 'aioi_allow_public_access', '__return_true' );
    }
    add_action( 'wp', 'my_function_makes_page_public' ) ;

    In this case, if the slug of the page I want to remain public is the slug of the current page, it sets the access to public for this page. The plugin returns without doing anything. You can adapt this to check multiple pages using page slugs, IDs, or some other characteristic unique to them.

Viewing 1 replies (of 1 total)
  • The topic ‘I need to whitelist three pages’ is closed to new replies.