How to disable users to view Other pages
<?php add_filter(‘pre_get_posts’, ‘my_current_author_posts’); function my_current_author_posts( $query ) { global $pagenow; // Check if you are on the right Admin page, do nothing if not if( ‘edit.php’ != $pagenow || ! isset( $_GET[‘post_type’] ) || ‘page’ != $_GET[‘post_type’] || ! is_admin() ) { return; } // get current user Object $current_user = wp_get_current_user(); // check user … Read more