Forum Discussion

nipW's avatar
nipW
Brass Contributor
Mar 25, 2021

News web part filtering

Hi All,

I have a news web part on a hub site that gets news from all associated sites. I want to show news only when the news type = Main News AND IsActive = Yes.

 

When I add Two filters under the Managed Property
1st filter - News type = Main News
2nd filter - IsActive = Yes
It filters with OR not AND. How can I get AND condition?
Thanks.

    • nipW's avatar
      nipW
      Brass Contributor
      So that means there is no way I can achieve this? Any idea pl.
      Thanks.
      • No. At least at the current version, it's not possible to modify the actual query.

        One out-of-the-box alternative is to use Highlighted Content Web Part, where you can define the exact search query. Of course, layout options are different.

        If you want to fully customize the search query and the result layout, the PnP Search result web part is the way to go. https://microsoft-search.github.io/pnp-modern-search/

Resources