Custom Endpoint for Plugin Data
-
I am working with an editorial brand to launch their new website using WordPress as a backend and CMS but with Node/Express middleware and an Angular front end via the WP REST API.
An important part of any editorial is post curation; in our case, we have sections for Featured, Latest, and Popular. On their current website, they use the Zone Manager (Zoninator) plugin for this purpose.
However, the WP REST API is unable to access the data of the Zone Manager to see what posts should currently be Featured/Popular/Latest, and so I have no way of pulling the correct posts to our Landing Page. If the Zone Manager injected some kind of flag into the JSON Post Object, everything would be fine, but it does not do that. We contemplated using specific categories to denote these zones, but this is not an ideal solution.
Is there any way to write a custom endpoint for the WP REST API that would be able to call posts that are only present in certain zones? I’m a JavaScript guy with no PHP experience so I recognize I will have some difficulties in doing so, but I need to know if this is even possible first.
Any additional advice or ideas are welcomed too.
- The topic ‘Custom Endpoint for Plugin Data’ is closed to new replies.