Filtering articles in a SharePoint news web part
In a SharePoint page, news web parts can be customized to filter and display certain articles based on a property. To set this up, news articles and the news web part must be updated.
Updating articles for filtering in a news web part
Depending on how you want to filter, this will involve either renaming article titles and/or creating a property and applying tags to relevant articles.
Renaming articles with a keyword
- Go to your site, select the gear icon (top right corner) > Site contents > Site Pages.
- For each article that must be renamed, click into the title and Edit the page.
- In the top heading, enter the new title with the keyword. Republish to save your changes.
Creating a property on your pages
- Go to your site, select the gear icon (top right corner) > Site contents > Site Pages.
- Select +Add column (on the right) > Choice.
- Provide a Name and enter the Choices. Select Save.
- To update choices later, click the column's heading > Column settings > Edit. Make your changes under Choices and Save.
To assign a property on articles that already exist, go to Site Pages, hover over an item and select the ellipses (...) on the right > Details. In the pane, scroll down to the property and click into the field to assign a tag.
To assign a property on an article draft as it's being created, select Page Details at the top. In the pane, scroll down to the property and click into the field to assign a tag.
Adding a news web part and applying a filter
- Go to your page in SharePoint and Edit.
- Hover about the page and select +. Search and select the News web part.
- Click into the News web part and select the Pencil icon (to the left).
- In the pane, scroll down to Filter. Select the dropdown to determine your filter.
- To filter based on a title keyword, select Title includes the words. In the below field, enter the keyword. Republish the page.
-
- To filter based on a property, select Page properties. Under Property name, select the property's name and choice you want to filter by. Republish the page.
You can embed multiple new web parts in one page with different filters by repeating the above steps.