Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.
Use the Highlighted content web part

When you add a modern page to a site, you add and customize web parts, which are the building blocks of your page.

This article describes the Highlighted content web part.

Use this web part to dynamically display content (documents, pages, news, videos, images, etc.) from a document library, a site, a set of sites, a site collection, or all sites. By default, this web part shows your most recent documents. If you don't have any documents, files, or pages on your site, you'll first have to create or upload them

Example of highlighted content on a page

How does it work?

Add the Highlighted content web part to a page

Choose the content

Filter and sort

Custom query

Audience targeting

Choose the layout

How does it work?

  1. Add the Highlighted content web part: Start with adding the web part to your page.

  2. Choose content: Choose the source location (such as a site or document library) and type of content to show (such as documents, pages, news, videos, images, etc.).

  3. Filter, sort, and query:  Set filters to narrow down the content to show (such as documents modified by the current user) and a sort order. If you're familiar with query languages, you can also create a custom query.

  4. Select a layout: Choose between Cards, List, Carousel, or Filmstrip layouts.

    Note: A maximum of 200 items can be returned.

Add the Highlighted content web part to a page

  1. If you're not in edit mode already, click Edit at the top right of the page.

  2. Hover your mouse above or below an existing web part or under the title region, click Circled plus sign used to add a modern web part to a page, and then select the Highlighted content web part.

    Once the web part is on the page, you can change the title by typing over the default title Most recent documents.

  3. Click the Edit button Web part edit button and select your options.

Choose the content

Once you have added the web part and you see the web part property pane, do the following:

Highlighted content web part tool pane
  1. In the Source dropdown, select where you want to show content from: This site, A document library on this site, This site collection, The page library on this site, Select sites, or All sites. (This site is selected by default.) If your site is connected to a hub site, you will also have an option to select All sites in the hub.

    When you select Select sites, you can search for the site you want to add, or select one or more sites from Frequent sites, or Recent sites. You can select up to 30 sites.

    Select sites

    Notes: 

    • The Select sites option is not available in SharePoint Server, U.S. Government GCC High and DoD, and Office 365 operated by 21Vianet.

    • For SharePoint Server 2019, your choices are This site, A document library on this site, This site collection, and All sites.

    • If you plan on using multiple filters, see how they work together in the Using multiple filters section below.

  2. In the Type dropdown, select the type of content you want to show. The type of content available will depend on your source.

    If you want to show additional content types, click + Add content type.

Filter and sort

Once you have selected your content source and type, you can set filter and sort options to narrow down and organize the content.

  1. In the Filter dropdown, select what you want to filter by, and then enter the specific details for the filter. The filters available will depend on the content type.

    • Title includes the words Enter the search words for the titles you want to find

    • Content includes the words Enter the search words for the content you want to find

    • Recently added Enter the time period since an item was added (such as Today, Yesterday, Earlier this week, and so on).

    • Recently changed Enter the time period since an item was changed (such as Today, Yesterday, Earlier this week, and so on).

    • Created by Enter a user name if you choose Selected user. Otherwise, use Current user, which will filter for items created by whoever is viewing the page at the time.

    • Modified by Enter a user name if you choose Selected user. Otherwise, use Current user, which will filter for items created by whoever is viewing the page at the time.

    • Managed property This option is available for all Source options except Document library. Managed properties can be built-in or custom, but must be searchable. Enter a word to narrow down the list of searchable properties, select a property from the dropdown, and enter your criteria.

      For general information on managed properties, see Manage the search schema in SharePoint. For a list of available properties, see Overview of crawled and managed properties.

    The Filter options for the Highlighted Content web part in the modern SharePoint experience
  2. In the Sort by dropdown, choose your option. The default is Most recent.

    • Most recent

    • Most viewed: Shows the most viewed items across your source selection (for example, you may have selected multiple sites as your source).

    • Trending: Shows items trending around a user. The items shown are based on activity of the user's closest network of people and include files stored in OneDrive for Business and SharePoint. Trending insights help the user to discover potentially useful content that the user has access to, but has never viewed before. For more information, see Office Graph Insights.

    • Managed property ascending

    • Managed property descending

    The Sort By options for the Highlighted Content web part in the modern SharePoint experience

Using multiple filters

Using multiple filters is a great way to narrow down your content results. When you use multiple filters, your results will be based on OR operations for filters of the same type, and AND operations for filters of different types.

  • Example    If you select two filters: Title includes the word Status, and Title includes the word Project, your result will be all files that have Titles containing the word Status or Project.

On the other hand, if you select filters of different types, your results will be based on AND operations.

  • Example    If you select two filters: Title includes the word Status, and Created by megan, then you will get only those files that have Status in the Title and that are also created by megan.

When you select multiple filters of different types, your results will be based on grouped OR operations for all filters of the same type, and AND operations for filters of different types, as shown here:

Custom query

If you are familiar with using query languages, you can use Keyword Query Language (KQL) or Collaborative Application Markup Language (CAML) query strings to further customize your search.

Custom query settings

  1. Select Custom query.

  2. Select the source of the items you want to display. The source will determine the query language to use and the UI options you see:

    This site, This site collection, and Select sites use KQL query strings. For more information on KQL, see the keyword-query-language-kql-syntax-reference

    Document library and Pages library on this site uses CAML query strings. For more information on CAML, see the query schema for CAML.

    Notes: 

    • When you select a site source, a site ID and/or web ID is display for you and automatically appended to your query string.

    • SiteID and WebID values for custom queries

  3. When you're done entering your query string, click Apply.

Custom query to show Microsoft Teams meeting recordings

If your organization has enabled saving Teams meeting recordings to OneDrive and SharePoint then you can use a custom query in the highlighted content web part to show only meeting recordings.

  1. Follow the steps above for a Custom query.

  2. In the Query text enter: ProgID:Media AND ProgID:Meeting

  3. When you're done entering your query string, click Apply.

Audience targeting

By using audience targeting, you can highlight content to specific groups of people. This is useful when you want to present information that is relevant to a particular group of people. For example, you can target files dealing with a specific project to team members and stakeholders of the project.

To use audience targeting, you must first enable audience targeting for the library that contains the items for targeting, select your audience, and then enable audience targeting in the Highlighted content web part.

Note: If you've selected an audience group that you recently created or changed, it may take some time to see targeting applied for that group.

Enable audience targeting in a library

  1. From your site's home page, select Site contents.

  2. Hover over Documents, select the ellipses (...) and then select Settings.

    Image of the Site contents page with the cursor hovering over Settings in the Documents menu.

  3. Select Audience targeting settings from the settings list.

  4. Select the checkbox to Enable audience targeting then select OK.

  5. Return to the library by selecting Documents (or the name of the library you are using) from the menu on the left side of the page. If you don't see your library on the left side of the page, go to Settings on the upper right, then select Site contents where you should be able to find your library.

  6. For each file you wish to target to specific audiences, select the ellipses (...).

  7. In the properties pane, select Edit all.

  8. Enter up to 50 audiences in the Audience section. Then click Save.

    Image of the edit pane with the text box in which to set target audiences

Audiences will then appear in the Documents library.

Image of a document and a presentation in the Documents library. Both have Contoso Members as the audience in the audience column.

Enable audience targeting in the web part

  1. If your page is not already in edit mode, select Edit at the top right of the page, and select the Highlighted content web part.

  2. Select the Edit web part Web part edit button button.

  3. In the Filter section, turn on Enable audience targeting.

    Image of the edit pane with the toggle to enable audience targeting in the on position

Caching of search results

It is recommended to enable group-level caching of search requests on Events or Highlighted Content web parts, especially for popular home pages or on category pages that are starting points for navigating to more detailed pages. After being enabled, the web part will first look in the cache for existing search results that match the query and the security group(s). If it doesn't find any search results in the cache, it will look in the search index.

  1. Go to the site page that contains a Highlighted Content web part.

  2. Select Edit to edit the site page.

  3. Select the Highlighted Content web part and then select Edit web part Screenshot of Edit pencil icon.

  4. In the web part settings pane, scroll to the Group-level caching setting.

  5. Specify the security group(s) by entering a group name or email. The search results will be cached for all users who belong to the same security group(s) and will improve page performance.

    Preview of the Enable caching for group option.

  6. Republish your SharePoint site page.

Choose the layout

Choose Cards, List, Filmstrip, or Carousel, then enter the number of items you'd like to show and whether to show the web part when no items are found.

Layout

Note: If you’re familiar with earlier versions of SharePoint, Highlighted content is the newer, simplified version of the Content Search web part.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×