News web part filtering

Brass Contributor

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?

5 Replies
Currently, only OR is supported on the News Web Part.
So that means there is no way I can achieve this? Any idea pl.
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.
Found that if you use same filter type it will take OR but if you use different type filters it will take AND. E.g managed property AND Title contains/Created by etc.
It makes no sense, but it is as you describe :) When you use Title as page property criteria (instead of just Title as a criteria) it switches the logic from OR to AND. Thank you for sharing - it helped me a lot.