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.

Source:

/*-----------------------------------------------------------------------------------*/
// 
// Latest Posts
// Shortcode Parameters:
//
/*-----------------------------------------------------------------------------------*/
// excerpt="true|false"         ------  display the excerpt or 'more' tag break
// length="50"                  ------  excerpt character 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="4,5,1"]
The Result

We All Have Valleys To Walk Through

We All Have Valleys To Walk Through

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…

Read More »

If you’re an experience designer, design an experience

If you’re an experience designer, design an experience

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…

Read More »

How to successfully validate your idea with a Landing Page MVP

How to successfully validate your idea with a Landing Page MVP

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…

Read More »

Creative People Say No

Creative People Say No

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…

Read More »

How iPads Are Changing the Education Industry

How iPads Are Changing the Education Industry

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…

Read More »

The Optimal Post is 7 Minutes

The Optimal Post is 7 Minutes

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…

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

We All Have Valleys To Walk Through

We All Have Valleys To Walk Through

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…

Read More »

Latest Posts from Category B

If you’re an experience designer, design an experience

If you’re an experience designer, design an experience

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…

Read More »

Latest Posts from Category C

Creative People Say No

Creative People Say No

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…

Read More »

Interrupting Paragraph

This paragraph is interrupting the columns, but we can continue below using the offset parameter! 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.

[break]

Latest Posts from Category A

How to successfully validate your idea with a Landing Page MVP

How to successfully validate your idea with a Landing Page MVP

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…

Read More »

Latest Posts from Category B

The Optimal Post is 7 Minutes

The Optimal Post is 7 Minutes

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…

Read More »

Latest Posts from Category C

The Future of Digital Products is in Storytelling

The Future of Digital Products is in Storytelling

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…

Read More

Source of Above Output

[one_third]
  <h4 class="sub">Latest Posts from Category A</h4>
  [latest excerpt="true" thumbs="true" length="50" morelink="Read More &raquo;" width="75" height="75" num="1" cat="8"]
[/one_third]
[one_third]
  <h4 class="sub">Latest Posts from Category B</h4>
  [latest excerpt="true" thumbs="true" length="50" morelink="Read More &raquo;" width="75" height="75" num="1" cat="8" offset="1"]
[/one_third]
[one_third_last]
  <h4 class="sub">Latest Posts from Category C</h4>
  [latest excerpt="true" thumbs="true" length="50" morelink="Read More &raquo;" width="75" height="75" num="1" cat="8" offset="2"]
[/one_third_last]
[clearfade]
<div class="cta">
<h4 class="sub">Interrupting Paragraph</h4>
<p>This paragraph is interrupting the columns, but we can continue below using the offset parameter! 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.</p>
</div>
[break]
[clearfade]
[one_third]
  <h4 class="sub">Latest Posts from Category A</h4>
  [latest excerpt="true" thumbs="true" length="50" morelink="Read More &raquo;" width="75" height="75" num="1" cat="8" offset="3"]
[/one_third]
[one_third]
  <h4 class="sub">Latest Posts from Category B</h4>
  [latest excerpt="true" thumbs="true" length="50" morelink="Read More &raquo;" width="75" height="75" num="1" cat="8" offset="4"]
[/one_third]
[one_third_last]
  <h4 class="sub">Latest Posts from Category C</h4>
  [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.