Forum Discussion
Filter News Webpart to not display certain posts
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.
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.
You need to set up the term you are filtering by in Site Settings - Term Store Management:
You create your term set (Page Tags) and the terms (in this case just Senior Leadership Team):
Next add a column in your Site Pages library which is a managed metadata column:
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.
Next we add the web part. Filter by Managed property
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.
Select Doesn't contain and add the search value which in this case will be Senior Leadership Team as shown in the first image.
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
- SrijaBandyopadhyayJan 14, 2021Copper Contributor
Hello RobElliott ,
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.