Fetch author in wordpress api
Question
I am trying to make a mobile app(React-Native) for a WordPress blog managed by
someone I know.
I am trying to fetch author details through the API. I have used the _embed option. However, the author name is not what I wanted.
Before I confuse you more, let me show you
- In the WordPress posts, I see Author as “Heisenberg” (The person who manages this WordPress account)
- Now when I click on the post and scroll below the content, I see the author section. Here we have the actual author “Pinkman”.
But in the JSON under the _embedded.author property, I get this – [{“name”:”Heisenberg”…..}]
What can I possibly change to give credits to Pinkman?
And supposing I can’t change the author name on the main page.
Thanks
0
api, embed, json, rest-api
4 years
2020-05-26T10:10:20-05:00
2020-05-26T10:10:20-05:00 0 Answers
98 views
0
Leave an answer