The code below prevents a page (defined by its title) from being deleted.
When I try to implement two occurrences of this code (one for each page I want to prevent from being deleted) I receive the white screen of death.
How would I list more than one page by title and prevent both from being deleted?
add_action( 'wp_trash_post', 'stop_deleting');
function stop_deleting($page){
$page = get_page_by_title( 'About' );
if ($page)
die('You are not allowed to delete this page');
}
Please show us your actual code, and don’t just describe what you implemented. In this particular case, it is vital to see how you tried to implement two occurrences of the code.
Anyway, from what I understand, the following function should do what you’ve asked for: