Skip to content
← Back to the journal
Tips / Recommendations 1 min read

Displaying pages only to authorized users wordpress

function prefix_redirect_function() {
if ( is_page(552 , 554) && !is_user_logged_in() ) { // 42 это ID
// редирект на главную:        wp_redirect( home_url() );
// или так на url:
// wp_redirect( ‘http://www.example.com’, 301 );exit;
    }
}
.page-id-296 .zip-check {display:none}

Leave a Reply

Your email address will not be published. Required fields are marked *

nineteen + 8 =

From insight to action

Need a clear digital solution for your business?

Discuss a project ↗