Filtering the SharePoint 2010 Blog Posts web part

Sometimes it’s the little things that drive you mad.

We got a report from a customer following a SharePoint 2007 to 2010 upgrade that their Blog site was showing too many posts, and they wanted to filter it by category.  That’s a simple enough request, right?

In 2007, the user explained, she’d Edit the Page, Edit Web Part, then click on the ‘Edit the current view’ to get the ability to set the filter criteria.  However, in 2010, the ‘Edit the current view’ link never appeared.

I set off to confirm what she was seeing.

In my 2010 development lab, I created a new site using the Blog site template.

As advertised, the default view of the site showed the ‘Posts’ web part showing all the approved posts from the blog.  I added a few other posts, and set one of the categories to be called ‘Announcements’.

So, as the user did, I went to Edit the web part.

Sure enough, the ‘Edit the current view’ was notably absent.

I was able to get the link to s how up, by changing the Selected View, clicking ‘Apply’, then re-selecting ‘<Summary View>’ and clicking ‘Apply’ again.

However, when I clicked on the link, I got a whole lot of nothing.

So, on to plan B as it was evident this was not to be done through the Browser UI.  I launched SharePoint Designer and loaded up the Blog site.

Then clicked on ‘Edit site home page’ to load up the web part page.  There was my Posts web part.

By selecting the Web Part, I got a ‘List View Tools’ ribbon with a nice big ‘Filter’ button on it.

Clicking the Filter button brings up the ‘Filter Criteria’ dialog, where I could add my category filters.

After adding the additional criteria, the Posts web part showed the filtered list of entries.

Save the page in SharePoint Designer, which will automatically publish the changes to the server.

Now, when I go back to the Blog site, I see the filtered list of entries.






3 responses to “Filtering the SharePoint 2010 Blog Posts web part”

  1. Sam Avatar

    Thanks, found this really helpful. I used this to apply an approval column to my blog site, because the OOB publishing/approval wouldn’t work with a dynamic web part I created that displays the most recent blog entry on the root homepage.

  2. Brenda Avatar

    This is a great post, and probably the only one out there because I have been looking for days. The issue is that Designer 2013 have change quite a bit with this new version. Have you try this with SP 2013? The issue still happening so seems that MS hasn’t look at this at all.
    Thanks a lot will try it anyway,

  3. Paul Avatar

    Thanks for this – because I didn’t have access to the template I had to edit the code directly. If anyone reading this needs to do that then look through the code for “Today” and you’ll find the place where it filters for only things that have been published. Nest another in there and you are done. The current user is specified by USERID which I used as follows:

Leave a Reply