How to Set SharePoint Highlighted Content to Show Files from a Folder
Question details
The user wants to configure the SharePoint Highlighted Content web part to display documents or videos stored within a specific folder.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Setting up a SharePoint site page to highlight documents or media files residing in a designated folder.
- Observed behavior
- The user needs the correct configuration steps and query formats to successfully filter and display the targeted folder's content on the page.
Ensure you have editing permissions for the SharePoint page and know the exact URL path of the target folder whose files you wish to display.
Use a Custom Query with the Folder Path
The most direct and reliable method to show files from a specific folder is by utilizing a custom KQL query with the folder's URL path.
By switching the Highlighted Content web part to use a custom query, you bypass standard metadata filters and directly target the storage location. This ensures all files within that exact path are pulled into the display.
Navigate to the SharePoint page where you want to display the files. Click 'Edit' in the top right corner.
Hover over the Highlighted Content web part and click the 'Edit web part' (pencil) icon on the left side to open the properties pane.
In the property pane on the right, look for the 'Source' dropdown and change the selection to 'Custom query'.
In the 'Query text (KQL)' box, type your query using the Path property. For example: Path:https://yoursiteurl/shared%20documents/yourfoldername/ (replace the URL with your actual folder path).
Click 'Apply' to test the query. If the files display correctly, click 'Republish' or 'Publish' at the top of the page to save your changes.

Filter Content Using a Managed Property
Apply a specific category metadata tag to the folder's files and filter the web part using that mapped managed property.
Edit and Manage Your Office Documents Seamlessly with WPS Office
While SharePoint handles your team's intranet file organization, WPS Office provides a lightweight, free, and highly compatible suite for creating and editing your downloaded Word, Excel, and PowerPoint files.
- 1. Download and Install WPS Office: Get the free WPS Office suite from the official website and install it on your PC or Mac in minutes.
- 2. Open Your SharePoint Documents: Download your target documents from your SharePoint folder and open them directly in WPS Office.
- 3. Edit and Re-upload: Make your changes using the familiar editing tools, save the document in its original Microsoft format, and upload it back to SharePoint.

Frequently Asked Questions
Why aren't my folder files showing up immediately after applying the custom query?
The Highlighted Content web part relies on SharePoint search. Search indexing can sometimes take 10 to 15 minutes to crawl new folders, files, or configuration changes. Wait a short while and refresh the page.
Can I use the 'Filter by Title' option to show a folder?
No, filtering by title generally applies to the individual file names rather than the folder name. Using a custom path query or a managed property (like a custom category column) is much more reliable for displaying all contents of a specific folder.
Does the custom path query include files inside subfolders?
Yes, by default a path query generally includes items nested beneath that URL path. If you only want files in the root of that specific folder, you may need to add additional KQL exclusions or rely on metadata tagging instead.




