By “post types” I mean the entities that represent the types, i.e. those returned by the
You can see an example here: https://test.frontity.org/wp-json/wp/v2/types
When I said homepage I was refering to the the archive of posts, which is usually the homepage. It could be rephrased as “the archive of posts, or the archive of a custom post type”.
Those archives are like categories or tags, but the entity with the name, description, and so on, is returned by the
types endpoint (as mentioned before).
I’m not sure if that way is more clear or not.
In the entities that the WP REST API returns, there is a field called
_links that basically links it with other related entities (more info here). Those links make the linked entity to be included when using the
_embed=true query param.
In this case, when any post is requested using
post type entity is embedded as well and populated in the frontity store. That way, you don’t have to do a different request to get the
post type entity. Something similar happens with categories and tags, but those are linked by default.
By the way, the specific code that adds the link is this one:
'type' => array(
'href' => $types_url,
'embeddable' => true,
Hope this clarifies your questions!