4 ms·
I started separating the admin from the "theme" by using the wordpress rest api (admin running in a subdomain). While this might seem overkill at first but I f
by fimdomeio 9y ago
I started separating the admin from the "theme" by using the wordpress rest api (admin running in a subdomain). While this might seem overkill at first but I find that there's a lot less documentation to read and I can reuse a lot more code from other projects without any changes.
- bluetidepro 9y agoDo you have any detailed notes on how you set this up? I haven't used WP in a long time, to be honest, so not sure how their rest api works? Is it straight forward? Would love to read about this setup you do, sounds great.
- rmccue 9y agoThe REST API is included with WordPress 4.7+ and on by default. Docs here: https://developer.wordpress.org/rest-api/ https://developer.wordpress.org/rest-api/ (if you find anything missing, I'd love to know)
- Already__Taken 9y agoMost of my WP sites don't do a lot. Can you use the rest API to handle the contact form and search? that was I could just use a static generation from wp itself. The wp admin wouldn't even need to be publically accessible then.
- sanat 9y agoThe WP API handle search but not contact forms. Most plugins still don't provide you with an API. Contact form 7's latest build has them using their own API - but it's still undocumented.
- yellowboxtenant 9y agoI can't picture developing WP themes without WP_Query class. Does that ever pose a problem for you?
- _neil 9y agoI love using the rest API like this. The main downside is you lose the inability to use many Wordpress plugins. I.e., if your users want to insert a poll into a page, before you could probably install a plugin that integrates with the editor and admin panel. With this approach, you'll (probably) need to build that functionality yourself. So, your content and users need to be just right to do this.