This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Gets the total amount of published posts on the blog.
The getTotalPosts()
function returns a Promise that resolves to the total amount of published posts on your blog's site.
You can use the language
option to filter posts for a specified language.
function getTotalPosts(
options: GetTotalPostsOptions,
): Promise<GetTotalPostsResponse>;
Language Options.
import { posts } from "@wix/blog";
async function getTotalPosts(options) {
const response = await posts.getTotalPosts(options);
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.