[sp-recent-posts]

This shortcode creates a listing of Posts in emails or on pages. Use the following options to customize the output:

  • posts - number of posts to display. (defaults to 1)
  • uid - the user id of the author you would like to see.
  • imgalign - Align images left or right. (defaults to left)
  • alternate - when writing posts, alternate the thumbnail images. (defaults to false)
  • readmoretext - the text for the read more link (defaults to Read More)
  • columns - the number of columns your posts should display in. Max number of columns is 3.
  • datespan - number of days of posts to render. Can be set to "daily", "weekly", or a number of days (datespan=3 for the last three days for example) (defaults to daily.)
  • featuredimg - Sets the desired image size to use when writing posts, defaults to "thumbnail"
  • cat - the category ids to get posts from, defaults to “all"
  • tag - the tag ids to get posts from, defaults to “all"
  • category_name - the category name to get posts from, defaults to “"
  • displayimages - Set to true by default, set to false if you want no images to display.
  • display_author - Set to false by default, set to true the author link will display.
  • post_type - the post type to get posts from, defaults to “posts" (only available in SendPress Pro)

Basic:

[sp-recent-posts]

All options with defaults:

[sp-recent-posts posts='1' uid='0' imgalign='left' alternate='false' ]

Wrapping content:

[sp-recent-posts]You can provide a Title. This is added before the post loop begins.[/sp-recent-posts]

Also, you can provide some extra options to limit the posts by categories or tags.

Limit by Category:

Using Category slug:
[sp-recent-posts category_name=cat1,cat2,cat3]
Using Category IDs
[sp-recent-posts cat=6,7,5]

Limit by Tags:

[sp-recent-posts tag=tag1,tag2,tag3]

Still need help? Contact Us Contact Us