Latest Posts Shortcode Documentation

Suppose you have a Page in WordPress with some company information, and you wanted to display some recent blog posts within it. Or maybe you have a FAQ section and you wanted to display some excerpts of other important items. The ‘Latest’ shortcode was created to remedy this problem and bring more dynamic content into your pages with minimal effort.

Below is a list of the accepted parameters for the “Latest” shortcode and some examples to help you get started.

/*-----------------------------------------------------------------------------------*/
// 
// Latest Posts
// Shortcode Parameters:
//
/*-----------------------------------------------------------------------------------*/
// excerpt="true|false"         ------	display the excerpt or 'more' tag break
// length="50"                  ------	excerpt word length
// thumbs="true|false"          ------	display featured thumbnail
// width="50"                   ------	featured thumbnail width
// cols="2"                     ------	split the results into X number of columns (4 max)
// height="50"                  ------	featured thumbnail height
// num="6"                      ------	number of entries to display
// cat="1,-2"                   ------	categories to include or exclude (-)
// morelink="Read More..."      ------	more link text
// offset="0"                   ------	offset/skip X number of posts
// type="page|post"             ------	query type
// parent="1" (page only)       ------	page parent
// orderby="date|customfield"   ------	custom ordering
// order="ASC|DESC"             ------	sort order
/*-----------------------------------------------------------------------------------*/

// Example: [latest excerpt="true" thumbs="true" width="50" height="50" num="5" cat="8,10,11"]

/*-----------------------------------------------------------------------------------*/

Example Using Columns

The example below shows how to use the latest shortcode to display your content within a set number of columns. If you’d like to use some of your own custom markup inside the shortcode, but still want to use columns, see the advanced example further below.

The Code
[latest excerpt="true" thumbs="true" length="50" morelink="Read More »" width="75" height="75" num="6" cols="2" cat="8"]
The Result

Designers Idea Book

January 15, 2012
Designers Idea Book
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit…
Read More »

Creative Workshops

February 15, 2012
Creative Workshops
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit…
Read More »

Beautiful Web Design

March 8, 2012
Beautiful Web Design
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit…
Read More »

Don’t Make Me Think

May 10, 2012
Don’t Make Me Think
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit…
Read More »

Transcending CSS

July 10, 2012
Transcending CSS
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit…
Read More »

BulletProof Web Design

July 11, 2012
BulletProof Web Design
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit…
Read More »

Advanced Example

Below is a more advanced example combined with the adaptive fractional columns shortcode, using custom markup within the shortcode.

Latest Posts from Category A

Designers Idea Book

January 15, 2012
Designers Idea Book
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit…
Read More »
Latest Posts from Category B

Creative Workshops

February 15, 2012
Creative Workshops
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit…
Read More »
Latest Posts from Category C

Beautiful Web Design

March 8, 2012
Beautiful Web Design
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit…
Read More »
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Latest Posts from Category A

Don’t Make Me Think

May 10, 2012
Don’t Make Me Think
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit…
Read More »
Latest Posts from Category B

Transcending CSS

July 10, 2012
Transcending CSS
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit…
Read More »
Latest Posts from Category C

BulletProof Web Design

July 11, 2012
BulletProof Web Design
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit…
Read More

Source of Above Output

[one_third]
<h5>Latest Posts from Category A</h5>
[latest excerpt="true" thumbs="true" length="50" morelink="Read More »" width="75" height="75" num="1" cat="8"][/one_third]
[one_third]
<h5>Latest Posts from Category B</h5>
[latest excerpt="true" thumbs="true" length="50" morelink="Read More »" width="75" height="75" num="1" cat="8" offset="1"][/one_third]
[one_third_last]
<h5>Latest Posts from Category C</h5>
[latest excerpt="true" thumbs="true" length="50" morelink="Read More »" width="75" height="75" num="1" cat="8" offset="2"][/one_third_last]
[clearfade]
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
[break]
[break]
[clearfade]
[one_third]
<h5>Latest Posts from Category A</h5>
[latest excerpt="true" thumbs="true" length="50" morelink="Read More »" width="75" height="75" num="1" cat="8" offset="3"][/one_third]
[one_third]
<h5>Latest Posts from Category B</h5>
[latest excerpt="true" thumbs="true" length="50" morelink="Read More »" width="75" height="75" num="1" cat="8" offset="4"][/one_third]
[one_third_last]
<h5>Latest Posts from Category C</h5>
[latest excerpt="true" thumbs="true" length="50" morelink="Read More" width="75" height="75" num="1" cat="8" offset="5"][/one_third_last]
What could be cooler? Other than all the output above is 100% responsive to mobile and tablet devices.