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
meta
the same as the HTML markup<META
? - Can
meta
be used to provide data that would be used in a<META
whether it be adescription
or akeywords
or whatever? - Where may be found examples of the use of the
meta
keyword in REST API view and edit calls for Pages and other Endpoints? - How are arguments provided in
meta
to be formatted. - If
meta
doesn't set<META
, what may be used to update<META
descriptions 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.