The WP Post fields.

PostDataType

interface PostDataType {
    _embedded: {
        author: UserDataType[];
        wp:featuredmedia: MediaType[];
        wp:term: TermType[];
    };
    acf: object[];
    article_type: number[];
    author: number;
    categories: number[];
    comment_status: string;
    content: {
        protected: boolean;
        rendered: string;
    };
    date: string;
    date_gmt: string;
    excerpt: {
        protected: boolean;
        rendered: string;
    };
    featured_media: number;
    format: string;
    guid: {
        rendered: string;
    };
    id: number;
    link: string;
    meta: object[];
    modified: string;
    modified_gmt: string;
    ping_status: string;
    slug: string;
    status: string;
    sticky: boolean;
    tags: number[];
    template: string;
    title: {
        rendered: string;
    };
    type: string;
}

Properties

_embedded: {
    author: UserDataType[];
    wp:featuredmedia: MediaType[];
    wp:term: TermType[];
}

The _embedded.

Type declaration

acf: object[]

The acf fields. Expose fields to use custom post information in your JS app.

Tip

Expose Custom Post Types to use custom post types in your JS app.

See

https://www.advancedcustomfields.com/resources/adding-fields-posts/

article_type: number[]

The article type.

author: number

The author id.

categories: number[]

The categories.

comment_status: string

The comment status.

content: {
    protected: boolean;
    rendered: string;
}

The content.

Type declaration

  • protected: boolean

    The protected content.

  • rendered: string

    The rendered content.

date: string

The date.

date_gmt: string

The date gmt.

excerpt: {
    protected: boolean;
    rendered: string;
}

The excerpt.

Type declaration

  • protected: boolean

    The protected excerpt.

  • rendered: string

    The rendered excerpt.

featured_media: number

The featured media id.

format: string

The format.

guid: {
    rendered: string;
}

The guid.

Type declaration

  • rendered: string

    The rendered guid.

id: number

The id.

link: string

The link.

meta: object[]

The meta.

modified: string

The modified.

modified_gmt: string

The modified gmt.

ping_status: string

The ping status.

slug: string

The slug.

status: string

The status.

sticky: boolean

The sticky.

tags: number[]

The tags.

template: string

The template.

title: {
    rendered: string;
}

The title.

Type declaration

  • rendered: string

    The rendered title.

type: string

The type.

Generated using TypeDoc