How to Add Category Filters to Modern SharePoint Online News
Question details
Users need to add clickable category filters to Modern SharePoint Online news posts, a feature present in Classic SharePoint but missing in the modern experience.

- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- Customizing modern SharePoint news posts to enable category filtering using JSON view-formatting.
- Observed behavior
- Categories display in page properties but are not clickable filters by default. Pasting custom JSON code sometimes results in a 'Please enter valid view-formatting JSON' error.
Ensure you have Site Owner or Designer permissions in SharePoint Online, as you will need the appropriate rights to apply view-formatting JSON to lists or web parts.
Apply Custom View-Formatting JSON to News Posts
Use custom JSON code to transform static page properties into clickable category filters for modern news posts.
Since the modern SharePoint experience does not include built-in clickable category filters like the classic experience, you must use view-formatting JSON to customize the column or view display. This approach leverages SharePoint's supported configuration methods to recreate the filtering functionality.
Navigate to the SharePoint Modern News page and open the specific list view or web part settings where your news posts are displayed.
Click on the relevant column header or view options dropdown, select 'Column settings' or 'Format current view', and choose 'Advanced mode' to allow custom code entry.
Paste your custom view-formatting JSON code into the editor. If SharePoint displays a 'Please enter valid view-formatting JSON' error, carefully check your code for syntax errors, ensuring it is intended specifically for modern list views.
Click 'Save' to apply the formatting. Test the configuration by clicking the newly generated category links to verify they successfully filter the displayed news posts.

Looking for a Simpler Way to Manage Documents? Try WPS Office
While SharePoint offers complex enterprise intranet capabilities, managing your daily documents doesn't have to require custom JSON coding. WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office for seamless document creation, editing, and team collaboration.
- 1. Download and Install: Visit the official WPS website to download the free, lightweight installer for your operating system.
- 2. Open Existing Files: Easily open your existing .docx, .xlsx, and .pptx files directly in WPS Office without formatting loss.
- 3. Collaborate Instantly: Use built-in cloud sharing features to collaborate with team members without requiring complicated site configurations.

Frequently Asked Questions
Why are category filters missing in Modern SharePoint Online?
Microsoft redesigned the modern SharePoint experience for better performance, responsiveness, and mobile compatibility. This transition excluded some classic features like out-of-the-box clickable category filters, which must now be recreated using custom view-formatting JSON.
How do I fix the 'Please enter valid view-formatting JSON' error?
This error occurs when the custom JSON code contains syntax mistakes such as missing quotation marks, unclosed brackets, trailing commas, or unsupported SharePoint properties. Use an external JSON validator tool to inspect and correct your code before pasting it into SharePoint.
Will Classic SharePoint category filters return to the modern experience?
Microsoft continues to update Modern SharePoint with new web parts and dynamic filtering options, but there has been no official announcement regarding a complete restoration of the classic filter model. Custom JSON remains the officially supported method for building specialized filters.




