MCPcopy Create free account
hub / github.com/9d8dev/next-wp / getTagById

Function getTagById

lib/wordpress.ts:269–271  ·  view source on GitHub ↗
(id: number)

Source from the content-addressed store, hash-verified

267}
268
269export async function getTagById(id: number): Promise<Tag> {
270 return wordpressFetch<Tag>(`/wp-json/wp/v2/tags/${id}`);
271}
272
273export async function getTagBySlug(slug: string): Promise<Tag> {
274 return wordpressFetch<Tag[]>("/wp-json/wp/v2/tags", { slug }).then(

Callers

nothing calls this directly

Calls 1

wordpressFetchFunction · 0.85

Tested by

no test coverage detected