Custom REST API
-
Hello! I have been trying to create a custom REST API and have had no issues setting up a page to perform the $_GET function. I am now working on consuming the $_POST function, however when I try pass any values the page 404’s. I suspect it is something to do with permalinks however have not been able to resolve it. I have been using the POST method described here (exactly as is): https://dzikrirobbi.medium.com/rest-api-with-php-get-post-put-delete-8365fe092618
I have been using Postman to test and the exact same code works flawlessly on the example url. I am aware WP has inbuilt REST functionality, which I would rather not use however may explore if I am unable to resolve this.Any help is appreciated!
WP.com: Unknown
Jetpack: Yes
Correct account: Unknown -
Hi there,
I do not see any sites under your @claytonbrauwers WordPress.com account when I check on our end. You can confirm by visiting this page: https://wordpress.com/sites.
Is it possible you created your site under a different login with us or are using another provider like GoDaddy, Bluehost, Hostgator, etc. instead? What is the URL of the site you are needing help with?
Happy to check in our system so we can take a closer look.
-
Thanks Jerry,
The hosting is done through Bluehost and the URL is https://alphaclicks.net – unless there is some sort of backend access for WP staff you’re going to land on the Maintenance page.
-
Ah ok, that is a self-hosted WordPress.org site, hosted with Bluehost, which we can’t help with here.
To clear up any confusion, WordPress.com and WordPress.org are two different entities: https://wordpress.com/support/com-vs-org/
WordPress.org has complete documentation for self-hosted/installed versions of WordPress.org at https://wordpress.org/support/ and support at https://wordpress.org/support/forums/
-
All good, thanks guys! I’ll take my problems over there. I think I’m getting closer to an answer regardless which looks like it’ll involve creating a custom end point for the existing WP REST API.
- The topic ‘Custom REST API’ is closed to new replies.