University Marketing & Communications

December 19, 2012

[blogroll]: Embed blog posts into WordPress pages

By University of Washington

Using the [blogroll] shortcode is different than embedding a standard RSS feed. This shortcode is designed to pull and display your sites blog posts into a “Page” (not a default capability in WordPress). The default settings for the [blogroll] shortcode will display five complete posts with headlines and author.

Here is an example of the shortcode displaying images on the Office of Ceremonies Honorary Degrees page:

Blogroll Shortcode: Example displaying images

Click on image to enlarge.

Below are the available attributes that you can use to customize the [blogroll] shortcode.

Attribute Action shortcode Example
number=X The number of posts that will display on page [blogroll number=10]
trim=true Will shorten post text to 55 words and strip any formatting [blogroll trim=true]
excerpt=hide Will display only post titles (linking to full posts) [blogroll excerpt=hide]
image=show Will display thumbnail of featured post image to left of blurb [blogroll image=show]
author=hide Will not display post author [blogroll author=hide]
category=# Will display selected category instead of all posts via the category ID number [blogroll category=4]
category_name=category-slug Will display selected category instead of all posts via the category slug [blogroll category_name=recent-events]


We want to display 3 posts with text shortened to 55 words on the External Affairs site. To do this, we will enter the following shortcode:

[blogroll number=3 trim=true]

Below is the example [blogroll] shortcode in the Visual Editor (you will only see the blog posts when you preview the page):

Blogroll Shortcode: In the Visual editor

Click image to enlarge.

Here is what the example shortcode looks like on the live site:

Blogroll Shortcode: Example on live site

Click on image to enlarge.