A WordPress plugin I made, based on this code snippet Jason Bahl sent me once. This is a WordPress plugin that disables the front-end for non-logged in users. If you are not logged in, you can only access the WordPress REST API or WPGraphQL.
- The Github repo for this plugin is here: https://github.com/shelob9/headless-mode/
- This plugin is maintained with a lot of help from Ben Meredith.