I have created a number of pages and don't want the person managing the site to be able to delete them. I don't want to use a plugin and there is probably some code that could go in the functions.php file to achieve this. Does anyone know how to hide or remove the 'delete' link if you are viewing all the available pages?

I found this post here, but it is 6 years old so not sure if it's still good in 2018.

  • 1
    Possible duplicate of How to disable page delete – Jacob Peattie Apr 4 '18 at 5:44
  • 1
    It's still accurate. – Jacob Peattie Apr 4 '18 at 5:44
  • I see this has been marked as a duplicate. That is why I posted the link to ask if that 6 year old post was still okay to use. – user8463989 Apr 4 '18 at 5:48
  • As I said, it is. – Jacob Peattie Apr 4 '18 at 5:52
  • 1
    I‘d probably use the map_meta_cap filter instead though – swissspidy Apr 4 '18 at 6:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.