You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document .root() method for accessing site name and description #427
Hey there,
I'd like to get the name and description through wpapi, how can I achieve this task?
If I send a GET request to wp-json I have these fields available.
But it seems there is no way to do that with wpapi.
Am I missing something?
The root method executes an arbitrary request against the wp-json endpoint, so if you call it with no string argument, you get the endpoint itself. Your issue hear makes a good point that I don't think we actually document this anywhere, so I'm going to alter this issue to track adding those instructions. Thank you!
Activity
kadamwhite commentedon May 27, 2019
You may use
.root():The
rootmethod executes an arbitrary request against thewp-jsonendpoint, so if you call it with no string argument, you get the endpoint itself. Your issue hear makes a good point that I don't think we actually document this anywhere, so I'm going to alter this issue to track adding those instructions. Thank you![-]How to get site name and description[/-][+]Document .root() method for accessing site name and description[/+]