How to Use Highlighted Content Web Part in SharePoint Online

While working with the SharePoint site, I need to highlight the limited documents or news so at that time, I can use the highlighted content web part to highlight the content like documents, pages, news, images, videos, etc.

In this Modern SharePoint Online tutorial, we will show you how to Add a Highlighted content web part in SharePoint Online. Also, we will see how to customize the Highlighted content web part in SharePoint Online. Such as:

  • Filter SharePoint Highlighted Content Web part
  • Add a Custom query to Highlighted Content Web part in SharePoint Online
  • How to enable audience targeting in SharePoint Online Highlighted content web part

SharePoint Online Highlighted Content Web Part

  • By using this SharePoint Online Highlighted content web part, users can display the content that they want to highlight.
  • A SharePoint Online Highlighted content web part can also display the content (documents, pages, news, images, videos, etc…)
  • In this Highlighted content web part, by default, we get our most recent documents and we can also create and upload new documents.
  • SharePoint Online Highlighted content web part helps to display the basic filter and Custom Query with CAML or KQL code.
  • Before enabling the audience targeting in the Highlighted content web part, you should enable the audience targeting in the SharePoint Online document library or list.

Add a Highlighted content web part in SharePoint Online

For example, we have created a SharePoint Online page where we can add a Highlighted content web part per the requirement.

To do so, follow the below instructions are:

  • Open the SharePoint site page -> Click on the Edit icon (right top corner) of the page as shown below:
SharePoint Online Highlighted Content Web Part
  • Now, click on the +(Add a new web part in column one) 
SharePoint Highlighted Content Web Part
  • Search the Highlighted content web part -> Select Highlighted content web part like below:
Highlighted content web part from the SharePoint modern site page
  • Once the Highlighted content web part is added, by default, we get the Most recent documents.
Highlighted content web part in the modern SharePoint site page
  • And also dynamically we can select documents, pages, videos, or other content based on search and filtering options as shown below:
Add a Highlighted content web part in SharePoint Online

This is how to add Highlighted content web part to SharePoint Online.

How to filter a SharePoint Online Highlighted Content Web Part

Now, we will discuss how to filter a Highlighted content web part in SharePoint Online. Follow the below steps:

  • Go to the Highlighted Content web part -> Click on the Edit icon as shown below:
How to add highlighted content web part in SharePoint online

Once click on the Edit icon we get three Filter options:

  1. Content
  2. Filter and sort
  3. Layout
How to edit a highlighted content web part in a SharePoint Online site page

Content

  • When we will expand this Content drop-down, by default, the Source will be selected by This site. And, also we can choose various sources such as:
    • A document library on this site
    • This site collection
    • This page library on this site
    • Select sites
    • All sites
How to edit a highlighted content web part from the modern site page
  • Now, select any (documents, pages, news, images, videos, etc…) that you need to highlight inside the Source drop-down. Example: I have chosen A document library on this site.
Edit a highlighted content web part from the modern SharePoint site page
  • Next, select the Company Documents under the Document Library drop-down option.
Use a basic filter for the highlighted content web part
  • Inside the Document type drop-down, where we can choose different formats like Word, Excel, Powerpoint, Onenote, PDF, Any, etc…
  • Also, select the +Add document type to add a new document type.
How to change a highlighted content web part in the SharePoint site page

This is how to change the Content in a Highlighted content web part.

Filter and sort

  • Select the Filter and sort drop-down where, by default, we get Title includes the word option. Also, we choose any of the below options:
    • Content includes the words
    • Recently added
    • Recently changed
    • Created by
    • Modified by
    • Managed property
Add filter to the SharePoint Page highlighted content type web part
  • For example, we can filter the Recently added documents and Search the keywords by using the Since drop-down (Last month).
  • Also, we can add a new filter by using the +Add filter option, as shown below:
Highlighted content filter pane in the SharePoint site page
  • Similarly, click on the Sort by drop-down -> Select the Most recent option among all options to get recent documents as shown below:
Highlighted content filter pane in the modern site page

Layout

Let us see how to choose different types of layouts available in the highlighted content web part. To do so, follow the steps are:

  • Click on the Layout drop-down -> Turn on the Show title and commands toggle.
  • By default, it will be a Grid layout. If we want to change the layout, then choose the below options such as:
    • List Carousel
    • Compact
    • Filmstrip
Choose a layout in a highlighted content web part
  • Next, enter the items at a time (No of items must be between 1 to 500) in the Highlighted content web part.
  • Also, if we want to Hide this web part (Highlighted content) then click on the Check box as shown below:
How to edit a Highlighted Content web part from SharePoint Online

See below screenshot that how to filter a Highlighted content web part in SharePoint Online:

Edit a Highlighted Content web part from SharePoint Online

This is how to use a basic filter for the highlighted content web part in SharePoint Online.

Add a Custom query in SharePoint Online Highlighted content web part

Let’s see how to add a custom query in the highlighted content web part in SharePoint Online. We can get two query languages such as:

  1. KQL (Keyword Query Language)
  2. CAML (Collaborative Application Markup Language)
  • Select the Custom query button -> Click on the Query drop-down -> Select the Source drop-down.
Add a custom query in the highlighted content web part
  • Next, select Source (This site) -> Enter the KQL query in the Query box -> Click on the Apply button.
 title:"About Company"
Add a custom query to the SharePoint site page
  • Similarly, Select the Source (A document library on this site) -> Click on the Furniture Documents under the Document library.
  • Next, provide the CAML query code in the Query box -> Click on the Apply button.
<View><Query>
<Where>
<Eq>
<FieldRef Name="Furniture Types"/>
<Value Type='Choice'>Furniture Documents</Value></Eq>
</Where></Query></View>

Where,

  1. FieldRef Name = The FieldRef element is a reference to the column
  2. Furniture Types = Choice column
  3. Furniture Documents = Name of the Document Library
Add a custom query to the SharePoint modern site page
  • Refer to the below image that explores how we get a highlighted content web part after using the CAML query code:
How to add a custom query in the highlighted content web part.

This is how to add a custom query in SharePoint Online highlighted content web part.

Check: How to Enable Versioning in SharePoint Online Document Library

Enable audience targeting in SharePoint Highlighted Content web part

Before enabling the audience targeting in the Highlighted content web part, you should enable the audience targeting in the SharePoint Online document library or list.

Let’s see an overview of the Audience’s targeting:

  • Audience targeting is to select a particular group of people who can see the content in SharePoint Online.
  • By using audience targeting, we can share specific content that is relevant to specific people.

Note:

Even if we are enable the audience targeting, other user also can able to see the all content. That’s why we don’t think audience targeting is a replacement of the permissions or control security.

Refer to the screenshot below that can express how to turn on the Enable audience targeting option in a Highlighted content web part:

How to enable audience targeting from a Highlighted Content web part

To use audience targeting, you must enable audience targeting for the SharePoint Online document library. To do so, follow the below steps are:

  • Open the SharePoint Site contents page -> Click on the document -> Select ellipses (…) to Show actions -> Click on Settings as shown below:
Enable audience targeting in SharePoint Online
  • Select the Audience targeting settings under the Settings list like below:
How to enable audience targeting in the highlighted content web part
  • Select the check box to Enable the audience targeting, then click on the OK button.
How to enable audience targeting in the SharePoint Online
  • Now, back to the Document library, where we get an Audience column. Select the specific file -> Click on the Details pane (i).
Enable audience targeting in the SharePoint modern site
  • In the Details pane -> Select the Properties section -> Click on the Edit all option.
  • Next, select the Audience (Enter up to 50 audiences) option -> Enter the name or email address of the group (SharePoint Online Group) -> Click on the Save button.
How to add group of people in the SharePoint Online site
  • Now, see the below image that how we can get an Audience column in the document library.
Add a group of people to the SharePoint Online site

Now, we will see how to turn on the enable audience targeting to share specific content that is relevant to specific people in the Highlighted content web part.

To enable audience targeting, follow the below steps are:

  • Go to the Highlighted Content web part -> Click on the Edit icon -> Select Filter section -> Turn on Enable audience targeting as shown below:
Enable audience targeting in the highlighted content web part
Enable audience targeting in the highlighted content web part

This is how to enable audience targeting in SharePoint Online.

Conclusion

In this Modern SharePoint Online tutorial, we will learn an Overview of the Highlighted content web part and how to Add a Highlighted content web part in SharePoint Online.

Also, we will see how to customize the Highlighted content web part in SharePoint Online. Such as:

  • Filter SharePoint Highlighted Content Web part
  • Add a Custom query to the Highlighted Content Web part in SharePoint Online
  • How to enable audience targeting in SharePoint Online Highlighted content web part

You may like the following tutorials: