hops … really really sorry.
I made a mistake and choose the wrong window to post the report.
I suggest to implement a different redirect for each unallowed page.
Something like this (NOT tested, i’m NOT a PHP skilled dev):
if ( is_user_logged_in() ) {
return;
}
// TODO admin page to manage unallowed pages and redirect to urls
$unallowed_pages = array(345, 234, 732); // pages ID
$redirect_to = array('/firstURL/', 'secondULR', 'thirdURL');
$queried = get_queried_object_id();
$found_at_index = array_search($queried, $unallowed_pages , true);
if ( !$found_at_index ) {
return;
}
wp_redirect( site_url( $redirect_to[$found_at_index] ) );
exit();
-
This reply was modified 8 years, 11 months ago by dragogio.
drmen8x : i have the same problem. Did you find a solution?