Filter News Webpart to not display certain posts

%3CLINGO-SUB%20id%3D%22lingo-sub-1831898%22%20slang%3D%22en-US%22%3EFilter%20News%20Webpart%20to%20not%20display%20certain%20posts%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1831898%22%20slang%3D%22en-US%22%3E%3CP%3EI%20know%20that%20you%20can%20filter%20news%20items%20you%20want%20to%20display%20in%20a%20web%20part%2C%20but%20is%20there%20a%20way%20to%20set%20a%20filter%20so%20that%20it%20doesn't%20display%20a%20news%20item%3F%3CBR%20%2F%3E%3CBR%20%2F%3EI%20am%20creating%20two%20news%20Web%20parts%20on%20the%20same%20comms%20site.%26nbsp%3B%20%26nbsp%3BI%20want%20one%20to%20focus%20on%20a%20very%20specific%20topic%20-%20every%20title%20will%20contain%20the%20same%20words%20so%20it's%20easy%20to%20filter%20the%20news%20using%20those%20words.%26nbsp%3B%20%26nbsp%3BHowever%2C%20I%20want%20the%20second%20web%20part%20to%20display%20all%20other%20news%20minus%20the%20topic%20I%20just%20described.%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BI%20realise%20I%20could%20re-order%20the%20news%2C%20but%20it%20would%20be%20much%20simpler%20just%20to%20set%20a%20rule.%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20hope%20that%20makes%20sense.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1831898%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ENews%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ENews%20webpart%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1832995%22%20slang%3D%22en-US%22%3ERe%3A%20Filter%20News%20Webpart%20to%20not%20display%20certain%20posts%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1832995%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F575155%22%20target%3D%22_blank%22%3E%40AmyNAT%3C%2FA%3E%26nbsp%3Bthere%20may%20be%20other%20ways%20to%20do%20this%20but%20what%20we%20do%20is%20to%20make%20use%20of%20the%20term%20store%20and%20a%20managed%20metadata%20column%20in%20our%20Site%20Pages%20library.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOn%20our%20intranet%20we%20have%20a%20news%20web%20part%20for%20general%20news%20which%20displays%20those%20news%20items%20where%20the%20Page%20tag%20metadata%20column%20has%20been%20set%20to%20%3CU%3Edoesn't'%20contain%3C%2FU%3E%20Senior%20Leadership%20Team.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%221-newswebpart-doesntContain.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F230129iB781F43CE44319D9%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%221-newswebpart-doesntContain.png%22%20alt%3D%221-newswebpart-doesntContain.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOn%20the%20same%20page%20we%20have%20another%20news%20website%20which%20just%20shows%20the%20most%20recent%20news%20item%20where%20the%20page%20tag%20metadata%20column%20%3CU%3Econtains%3C%2FU%3E%20Senior%20Leadership%20Team.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENote%20that%20it%20must%20be%20contains%2Fdoesn't%20contain%2C%20it%20won't%20work%20with%20is%20equal%20to%20etc.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%222-newswebpart-Contains.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F230130iA07DD30F1CE566A1%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222-newswebpart-Contains.png%22%20alt%3D%222-newswebpart-Contains.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20need%20to%20set%20up%20the%20term%20you%20are%20filtering%20by%20in%20Site%20Settings%20-%20Term%20Store%20Management%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%223a-SiteSettings-TermStore.png%22%20style%3D%22width%3A%20348px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F230138iE7C8E9CA35BF2577%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%223a-SiteSettings-TermStore.png%22%20alt%3D%223a-SiteSettings-TermStore.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20create%20your%20term%20set%20(Page%20Tags)%20and%20the%20terms%20(in%20this%20case%20just%20Senior%20Leadership%20Team)%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%223-term-store.png%22%20style%3D%22width%3A%20704px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F230128iA2179580DA627094%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%223-term-store.png%22%20alt%3D%223-term-store.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENext%20add%20a%20column%20in%20your%20Site%20Pages%20library%20which%20is%20a%20managed%20metadata%20column%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%224a-column-Pagetags.png%22%20style%3D%22width%3A%20931px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F230136i8089E20ADA339D17%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%224a-column-Pagetags.png%22%20alt%3D%224a-column-Pagetags.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%224b-SitePages-PageTags.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F230135iE128BAE8ABB040CC%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%224b-SitePages-PageTags.png%22%20alt%3D%224b-SitePages-PageTags.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThen%20when%20you%20are%20creating%20your%20news%20item%20the%20Page%20Details%20panel%20will%20show%20the%20PageTags%20column%20-%20we%20also%20use%20it%20to%20select%20other%20properties%20like%20the%20region%20of%20the%20country%2C%20the%20specialism%2C%20offices%20involved%20etc.%20Either%20leave%20it%20blank%20so%20that%20it%20is%20not%20a%20Senior%20Leadership%20Team%20news%20item%20and%20will%20therefore%20go%20into%20the%20general%20news%2C%20or%20start%20typing%20Senior%20and%20it%20will%20pick%20up%20the%20correct%20term%20from%20the%20term%20store.%20Click%20out%20of%20the%20field%20to%20save%20the%20selection.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%225-page-details.png%22%20style%3D%22width%3A%20912px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F230131i06992BB8E06D3C1D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%225-page-details.png%22%20alt%3D%225-page-details.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENext%20we%20add%20the%20web%20part.%20Filter%20by%20Managed%20property%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%226-filterbyManagedProperty.png%22%20style%3D%22width%3A%20293px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F230141i0E179343DCB8229F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%226-filterbyManagedProperty.png%22%20alt%3D%226-filterbyManagedProperty.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EStart%20typing%20in%20the%20Term%20Set%20you%20want%20which%20in%20this%20case%20is%20Page%20Tags.%20I%20just%20typed%20Page%20and%20it%20found%20it.%20Don't%20worry%20that%20it%20prefixes%20it%20with%20owstaxID%2C%20that%26nbsp%3B%20must%20be%20something%20to%20do%20with%20internal%20SharePoint%20naming%26nbsp%3B%20and%20it's%20fine.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%227-owstaxidPageTags.png%22%20style%3D%22width%3A%20270px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F230142i170FC39B8DE35E51%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%227-owstaxidPageTags.png%22%20alt%3D%227-owstaxidPageTags.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESelect%20Doesn't%20contain%20and%20add%20the%20search%20value%20which%20in%20this%20case%20will%20be%20Senior%20Leadership%20Team.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%228-searchValue.png%22%20style%3D%22width%3A%20296px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F230143iE5295435E995B94D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%228-searchValue.png%22%20alt%3D%228-searchValue.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20think%20the%20most%20difficult%20part%20of%20this%20is%20getting%20used%20to%20the%20Term%20Store.%20But%20y%3CSPAN%3Eou%20can%20read%20more%20about%20all%20this%20at%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fsharepointmaven.com%2F%3Fs%3Dterm%2Bstore%26amp%3Bpost_type%3Dpost%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsharepointmaven.com%2F%3Fs%3Dterm%2Bstore%26amp%3Bpost_type%3Dpost%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20result%20works%20consistently%20and%20very%20well%20and%20we%20use%20it%20every%20day%20with%20our%20news%20stories.%20Come%20back%20if%20you%20have%20any%20follow-on%20questions.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20size%3D%222%22%20color%3D%22%23006400%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20User%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1833918%22%20slang%3D%22en-US%22%3ERe%3A%20Filter%20News%20Webpart%20to%20not%20display%20certain%20posts%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1833918%22%20slang%3D%22en-US%22%3EThe%20simplest%20way%20to%20get%20this%20outcome%20would%20be%20to%20add%20a%20Column%20to%20your%20Site%20Pages%20library%20called%20something%20like%20News%20Type.%20That%20way%2C%20you%20don't%20have%20to%20rely%20on%20someone%20creating%20a%20Title%20with%20a%20specific%20term.%20You%20can%20create%20a%20page%20template%20for%20an%20article%20of%20this%20type%20where%20the%20News%20Type%20is%20pre-set%20to%20the%20topic%20that%20you%20want%20so%20as%20long%20as%20that%20template%20is%20used%2C%20the%20author%20does%20not%20even%20have%20to%20tag%20the%20page.%20Then%2C%20you%20can%20filter%20for%20News%20Type%20%3D%20%5BTopic%5D.%20You%20can%20filter%20for%20one%20or%20more%20Topics%20in%20different%20web%20parts%20to%20get%20the%20same%20outcome%20you%20are%20trying%20to%20get%20to%20-%20but%20using%20a%20filter.%20One%20web%20part%20filters%20for%20Topic%20%3D%20Special%20Topic.%20The%20other%20filters%20for%20either%20all%20the%20other%20topics%20or%20just%20a%20page%20tagged%20with%20News%20Type%20%3D%20News.%3C%2FLINGO-BODY%3E
New Contributor

I know that you can filter news items you want to display in a web part, but is there a way to set a filter so that it doesn't display a news item?

I am creating two news Web parts on the same comms site.   I want one to focus on a very specific topic - every title will contain the same words so it's easy to filter the news using those words.   However, I want the second web part to display all other news minus the topic I just described.     I realise I could re-order the news, but it would be much simpler just to set a rule.   

 

I hope that makes sense. 

3 Replies

Hi @AmyNAT there may be other ways to do this but what we do is to make use of the term store and a managed metadata column in our Site Pages library.

 

On our intranet we have a news web part for general news which displays those news items where the Page tag metadata column has been set to doesn't' contain Senior Leadership Team.

 

1-newswebpart-doesntContain.png

 

On the same page we have another news website which just shows the most recent news item where the page tag metadata column contains Senior Leadership Team.

 

Note that it must be contains/doesn't contain, it won't work with is equal to etc.

 

2-newswebpart-Contains.png

 

You need to set up the term you are filtering by in Site Settings - Term Store Management:

 

3a-SiteSettings-TermStore.png

 

You create your term set (Page Tags) and the terms (in this case just Senior Leadership Team):

 

3-term-store.png

 

Next add a column in your Site Pages library which is a managed metadata column:

 

4a-column-Pagetags.png

 

4b-SitePages-PageTags.png

 

Then when you are creating your news item the Page Details panel will show the PageTags column - we also use it to select other properties like the region of the country, the specialism, offices involved etc. Either leave it blank so that it is not a Senior Leadership Team news item and will therefore go into the general news, or start typing Senior and it will pick up the correct term from the term store. Click out of the field to save the selection.

 

5-page-details.png

 

Next we add the web part. Filter by Managed property

6-filterbyManagedProperty.png

Start typing in the Term Set you want which in this case is Page Tags. I just typed Page and it found it. Don't worry that it prefixes it with owstaxID, that  must be something to do with internal SharePoint naming  and it's fine.

 

7-owstaxidPageTags.png

 

Select Doesn't contain and add the search value which in this case will be Senior Leadership Team as shown in the first image.

 

8-searchValue.png

 

I think the most difficult part of this is getting used to the Term Store. But you can read more about all this at https://sharepointmaven.com/?s=term+store&post_type=post

 

The result works consistently and very well and we use it every day with our news stories. Come back if you have any follow-on questions.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

The simplest way to get this outcome would be to add a Column to your Site Pages library called something like News Type. That way, you don't have to rely on someone creating a Title with a specific term. You can create a page template for an article of this type where the News Type is pre-set to the topic that you want so as long as that template is used, the author does not even have to tag the page. Then, you can filter for News Type = [Topic]. You can filter for one or more Topics in different web parts to get the same outcome you are trying to get to - but using a filter. One web part filters for Topic = Special Topic. The other filters for either all the other topics or just a page tagged with News Type = News.

 

Hello @Rob Elliott ,

 

If I want to move particular news from one news web part(named, Recent News)to another news web part (named, Old news) after 7/10 days automatically, can I do that? If yes, please mention the steps to do so.