From 124632e79db6843d828b04de1c6f49aaf764c9b6 Mon Sep 17 00:00:00 2001 From: Zubair Ibn Zamir Date: Wed, 12 Nov 2025 09:50:03 +0600 Subject: [PATCH] add ?per_page=100 to tags, categories, pages, authors --- lib/wordpress.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/wordpress.ts b/lib/wordpress.ts index 74912533..959c12b2 100644 --- a/lib/wordpress.ts +++ b/lib/wordpress.ts @@ -229,7 +229,7 @@ export async function getPostBySlug(slug: string): Promise { } export async function getAllCategories(): Promise { - return wordpressFetch("/wp-json/wp/v2/categories"); + return wordpressFetch("/wp-json/wp/v2/categories?per_page=100"); } export async function getCategoryById(id: number): Promise { @@ -257,7 +257,7 @@ export async function getTagsByPost(postId: number): Promise { } export async function getAllTags(): Promise { - return wordpressFetch("/wp-json/wp/v2/tags"); + return wordpressFetch("/wp-json/wp/v2/tags?per_page=100"); } export async function getTagById(id: number): Promise { @@ -271,7 +271,7 @@ export async function getTagBySlug(slug: string): Promise { } export async function getAllPages(): Promise { - return wordpressFetch("/wp-json/wp/v2/pages"); + return wordpressFetch("/wp-json/wp/v2/pages?per_page=100"); } export async function getPageById(id: number): Promise { @@ -285,7 +285,7 @@ export async function getPageBySlug(slug: string): Promise { } export async function getAllAuthors(): Promise { - return wordpressFetch("/wp-json/wp/v2/users"); + return wordpressFetch("/wp-json/wp/v2/users?per_page=100"); } export async function getAuthorById(id: number): Promise {