I need help with WordPress's REST API.
In their handbook, in the Endpoint Reference for Pages there's a schema and in that schema there's a table with a row that says
|
meta object |
Meta fields. Context: view, edit |
No further mention of meta is made and no instructions are given on how it may be used or in what format its arguments need to be given.
Questions:
- Is this
metathe same as the HTML markup<META? - Can
metabe used to provide data that would be used in a<METAwhether it be adescriptionor akeywordsor whatever? - Where may be found examples of the use of the
metakeyword in REST API view and edit calls for Pages and other Endpoints? - How are arguments provided in
metato be formatted. - If
metadoesn't set<META, what may be used to update<METAdescriptions and keywords (that can be driven programmatically. Don't tell me about Yoast and other SEO tools.)
Top comments (4)
Meta is just a key-value you can tack on to an individual post. Plugins use it to add additional information to a post instead of defining a separate database table. There is some info about the meta db tables here: code.tutsplus.com/tutorials/unders...
EDIT: Also, it has nothing to do with META html tags. To modify those, you just need to change whichever PHP template file contains the head tags. Just use PHP to set them to whatever you need. You could technically pull from post or user database meta data to populate the html meta tags. That's a method. Or use a hook to print them in wp_head().
And here is info on interacting with metadata via the API. torquemag.io/2015/07/working-with-...
Hi @bugmagnet
Is it possible if we embed SEO tags from headless wordpress to main website (React JS)? i'm currently facing issue to fetch SEO related tags on header
Sorry, way outside my expertise.