How To: Displaying SharePoint Blogs on a SharePoint Online Homepage

Intro

In this post I will explain how to use the Content Query web part to display SharePoint blog posts on a SharePoint Online intranet site.

Displaying SharePoint Blogs on a SharePoint Online Homepage

We will explore three ways this feature can be built to display all blog posts, including filtering of the results in the Content Query web part.

1. Displaying all Blog Posts

Firstly we will add the web part and configure it to show all blogs.

Edit the page and in the ribbon under the ‘insert tab’, select ‘Web Part’; then select the ‘Content Rollup’ category and then select the ‘Content Query Web Part’, click ‘Add’.

Adding the Content Query Web Part

Next, ‘Edit the Web Part’.

Edit the Content Query Web Part

In the Query section, under ‘List type’, select ‘Posts’ from the drop down underneath, ‘Show items from this list type:’

Edit the Content Query Web Part Query

In the ‘Appearance’ section, change the ‘Title’ to ‘Our Blogs’.

Edit the Content Query Web Part Title

In the ‘Presentation’ section, set the item limit to 10, and make sure the ‘Fields to display’ link field is left blank. Save the Web Part and the page.

Edit the Content Query Web Part Presentation 1

Edit the Content Query Web Part Presentation 2

The Web Part will now display all blogs.

Content Query Web Part displaying all blogs

2. Displaying Featured Blogs

In order to display only ‘Featured blogs’ through the ‘Content Query’ web part, we first need to add an additional column to our ‘Posts list’ on our blog site.

To do this, navigate to your blog homepage and click ‘Manage Posts’.

Manage Posts

Click ‘List Settings’ under the list tab in the ribbon.

Posts List Settings

Click ‘Create column’ under the columns heading.

Create Column

Call the column “Feature Blog?” and select column type ‘Yes/No’ (check box).  In the description box you might want to enter a prompt for the user, e.g. “Would you like this blog to be featured?” Featured blogs are displayed to users on the intranet homepage. It is also worth setting the ‘Default value’ to ‘No’.

Feature Blogs Column

Now edit some of the blogs and tick the box to make them a ‘Feature Blog’.

Edit Blogs

Navigate back to the page containing your Content Query web part and ‘edit’ the web part.

In ‘the appearance’ section, change the name to ‘Featured Blogs’.

Content Query Webpart Title

In the ‘Query’ section, under ‘Additional Filters’ heading, set up the filter as follows:

Show items when: Featured Blog?…is equal to…Yes

Content Query Webpart Query

Click ‘OK’ and save the page.  Your web part will now only display those blogs that your content authors specify as ‘featured’.

Content Query Webpart displaying Feature Blogs

3. Displaying Popular Blogs

Next, we will configure the web part to only show ‘Popular blogs’ e.g. blogs that have a user rating of 4 or more stars out of 5 (on average).

In order to display only ‘Popular blogs’ through our Content Query web part, we first need to change the ‘Rating Settings’ on our blog site.

To do this, navigate to your blog homepage and click ‘manage post’ as before, on the ‘Posts List’ open the ribbon and click ‘List Settings’.

Posts List Settings

Click ‘Rating settings’ under the ‘General Settings’ heading.

Post Rating Settings

Change the voting/rating experience for this list from ‘Likes’ to ‘Star Ratings’.

Change Post Rating to Stars

Rate some of the blogs by clicking on the stars.

Rate Blogs

Now navigate back to the page containing your Content Query web part and edit the Web Part.

In the ‘Appearance’ section, change the name to ‘Our Top Rated Blogs’.

Content Editor Web Part Title

In the Query section under the ‘Additional Filters’ heading, set up the filter as follows:

Show items when: Rating (0-5)…is greater than or equal to…4

Content Editor Web Part Query

Click OK and save the page.  Your web part will now only display those blogs that have an average user rating of 4 or more stars out of 5.

Content Editor Web Part displaying Popular Blogs

This should now all be set up, we hope you found this page useful.