Exclude page by title for non admins
Get the page by its title, then use its ID: add_action(‘pre_get_posts’, ‘exclude_pages’); function exclude_pages($query) { if(! is_admin()) return $query; global $pagenow; if (‘edit.php’ === $pagenow && (get_query_var(‘post_type’) && ‘page’ === get_query_var(‘post_type’))) { // Get the page by its title, … $page = get_page_by_title(‘TITLE_HERE’); // then use its ID $query->set(‘post__not_in’, array($page->ID)); } return $query; } References: … Read more