Skip to content

Commit

Permalink
Merge pull request #158 from dailybruin/AuthorFeeds
Browse files Browse the repository at this point in the history
Modified author posts query to exclude overview and breaking feed pos…
  • Loading branch information
EdNawrocki authored Nov 20, 2024
2 parents c10e249 + f99776e commit c0749c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layouts/Author/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion pages/author/[slug].jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit c0749c5

Please sign in to comment.