From f99776eb8001a3e5ee0000e2eb36a9bd92c9df68 Mon Sep 17 00:00:00 2001 From: Ed Nawrocki Date: Wed, 20 Nov 2024 14:33:08 -0800 Subject: [PATCH] Modified author posts query to exclude overview and breaking feed posts properly --- layouts/Author/index.jsx | 2 +- pages/author/[slug].jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/Author/index.jsx b/layouts/Author/index.jsx index 6d8c5b8..159d273 100644 --- a/layouts/Author/index.jsx +++ b/layouts/Author/index.jsx @@ -23,7 +23,7 @@ export default class Author extends React.Component { getPosts(page) { fetch( - `${Config.apiUrl}/wp-json/wp/v2/posts?_embed&filter[author_name]=${this.props.author.slug}&page=${page}` + `${Config.apiUrl}/wp-json/wp/v2/posts?_embed&filter[author_name]=${this.props.author.slug}&page=${page}&categories_exclude=27179,27127` ) .then(response => response.json()) .then( diff --git a/pages/author/[slug].jsx b/pages/author/[slug].jsx index 673bb81..a25dbba 100644 --- a/pages/author/[slug].jsx +++ b/pages/author/[slug].jsx @@ -14,7 +14,7 @@ class Author extends Component { ); const author = await authorRes.json(); const postsRes = await fetch( - `${Config.apiUrl}/wp-json/wp/v2/posts?_embed&filter[author_name]=${slug}&categories_exclude=27179` // 27179 is the category id of breaking feed posts + `${Config.apiUrl}/wp-json/wp/v2/posts?_embed&filter[author_name]=${slug}&categories_exclude=27179,27127` // 27179 is the category id of breaking feed posts ); const posts = await postsRes.json(); const classifiedsRes = await fetch(