Skip to content

Commit

Permalink
Merge pull request #150 from dailybruin/Breaking-Feeds
Browse files Browse the repository at this point in the history
Removed breaking feed posts from showing up on author page
  • Loading branch information
EdNawrocki authored Nov 5, 2024
2 parents e1c1152 + e1edb36 commit 914bd3b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions 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}`
`${Config.apiUrl}/wp-json/wp/v2/posts?_embed&filter[author_name]=${slug}&categories_exclude=27179` // 27179 is the category id of breaking feed posts
);
const posts = await postsRes.json();
const classifiedsRes = await fetch(
Expand All @@ -30,11 +30,7 @@ class Author extends Component {
return (
<>
<Head>
<title
dangerouslySetInnerHTML={{
__html: this.props.author[0].name + " - Daily Bruin"
}}
/>
<title>{this.props.author[0].name + " - Daily Bruin"}</title>
</Head>
<AuthorLayout
author={this.props.author[0]}
Expand Down

0 comments on commit 914bd3b

Please sign in to comment.