Gets a post by the specified ID.
The getPost()
function returns a Promise that resolves to a post whose ID matches the given ID.
function getPost(
postId: string,
options: GetPostOptions,
): Promise<GetPostResponse>;
Post ID.
Options specifying which fields to return.
import { posts } from "@wix/blog";
async function getPost(postId, options) {
const response = await posts.getPost(postId, options);
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.