Thursday, July 7, 2016

Show blog posts on another site filtered by the blog category using the content search web part (SharePoint 365)

During the last month I learned how useful is the Content Search Web Part. I am creating a blog for multiple uses divided by categories and I want to have different views of the blog posts on different sites within the same Site Collection. To do so I am using a Content Search Web Part.

For reference, I am in the SharePoint 365 (2013) environment.

Step 1: Insert a Content Search Web Part.


Step 2: Click on "Change Query"

Step 3: Start Building your Query
At the Basics tab:
  • On the Select a query section click on "Items matching a content type" This will help you get only Blog Posts.
  • Add your Blog URL 


At the Refiners Tab:
  • Add ListItem_Posts t your refiners, located at the contentclass section.


Note that on the Managed Properties there is a refiner named BlogCategory, which we will use to filter by a specific category.


Go back to the Basics tab and add the BlogCategory filter.
  • On the "Add additional filters" write "BlogCategory: " and specify which category value you want to filter the results.

Step 4: Click OK and adjust how you want to display the results.


There you go!


No comments:

Post a Comment

Know us

Our Team

Contact us

Name

Email *

Message *