Hide WordPress block editor for pages with a specific page template

Recently I had the requirement in a project where I wanted to remove the block editor, only for pages that had a specific page template assigned. In my case the page template was inside the templates folder of the theme and the filename was page-content.php. This meant the page template had a slug of: templates/page-content.php The following code, […]