Setup SharePoint Highlighted Content Webpart For Managed Property Filter

There are different ways to search content on SharePoint classic sites like content search and content query webpart. But SharePoint modern sites have limited out of the box webparts. If we have a requirement to show documents, news or any other item from any site collection, we can use “Highlighted Content Webpart” which can get data based on different filters. In this article I will describe how to configure managed property based filter on highlighted content webpart for SharePoint modern site.
 
Let`s say we have a requirement to categorize all news within all site collections in your tenant in three categories,
  • General News
  • IT News
  • Vertical News
Home page of the portal should have these sections to display all three kind of News from everywhere.
 
Step 1: Create Site Column
 
Go to all sites one by one and add site column “Site Type”.
 
Go to Settings - Site Information - View all site setting - Site Columns
 
Setup SharePoint Highlighted Content Webpart For Managed Property Filter
 
 Setup SharePoint Highlighted Content Webpart For Managed Property Filter
Setup SharePoint Highlighted Content Webpart For Managed Property Filter 
Setup SharePoint Highlighted Content Webpart For Managed Property Filter
 
Create new site column with the below details,
  • Name – “SiteType”
  • Type – Choice field
  • Values – General , IT , Vertical
Setup SharePoint Highlighted Content Webpart For Managed Property Filter 
Setup SharePoint Highlighted Content Webpart For Managed Property Filter
 
After adding Site column, “SiteType” should be there Under “Custom Columns”.
 
 Setup SharePoint Highlighted Content Webpart For Managed Property Filter
 
Step 2: Add Site column to Site pages
 
After site column is created, the next step is to add this site column to site pages library.
 
Go to Settings - Site Content - Site Pages library
 
 
Setup SharePoint Highlighted Content Webpart For Managed Property Filter 
Setup SharePoint Highlighted Content Webpart For Managed Property Filter 
Setup SharePoint Highlighted Content Webpart For Managed Property Filter
 
Choose group “Custom columns” & columns “SiteType” - Add - Ok
 
Please make sure “SiteType” column is available on “Site Pages” library now.
 
Setup SharePoint Highlighted Content Webpart For Managed Property Filter
 
Note
Step 1 & 2 needs to be performed with each site collection related to the portal.
 
Step 3:  Add Highlighted content webpart
 
Edit home page or any page where you want to show all news, edit the page and add "highlighted content webpart" with the below configuration:
 
Setup SharePoint Highlighted Content Webpart For Managed Property Filter
Setup SharePoint Highlighted Content Webpart For Managed Property Filter
 
Set Managed Property -- > SiteType. 
 
Note
Managed properties are generated automatically for site columns, if you don't see the name of your managed property in the highlighted content webpart, please verify managed property under "seach service application -->search schema"