Latest Post Shortcode Options Sample

Latest Post Shortcode

Introduction

For each of the shortcode options, I will give a small example of the key and value.

Please note that some of the options depend on other options, hence, configuring the shortcode manually might not produce the expected results.

I encourage you to use the plugin button that allows you to configure the shortcode with the UI

LPS Initial Options

  • Number of Posts: the number of items to display if there is no pagination.
    limit="4"
  • Pagination: No pagination, Paginate results. For the paginate results, there are extra available options
    • Records Per Page
      perpage="4"
    • Offset
      offset="0"
    • Navigation options: Hide Pages Navigation, Show Pages Navigation (range of 4 visible pages), Show Pages Navigation (range of 5 visible pages), Show Pages Navigation (range of 10 visible pages)
      showpages="5"
    • Pagination Position: Above the results, Below the results, Above & Below the results
      pagespos="2"
  • Post Type*: the post types to be selected
    type=”post”
  • Display Post: the details to display for each post.
    display=”title,date,content-small”
  • Chars from excerpt/content: this will allow specifying the number of chars for the options that require a few chars,
    chrlimit="50"
  • Use Post URL: No link to the post, Link to the post, Link to the post (_blank)
    url="yes"
  • Extra Options: Show post tags, Ajax Pagination
    show_extra="tags,ajax_pagination"
  • Order by: Date DESC, Date ASC, Menu Order ASC, Menu Order DESC, Title ASC, Title DESC
    orderby="dateD"
  • Status: the post statuses you want to be exposed (this is dynamic, the list of post statuses will include the native statuses and the post statuses registered in your application by the other plugins)
    status="publish,private"
  • Use Image*: No image or one selected image size
    image="thumbnail"
  • CSS Class Selector: you can use the builtin two-columns or three-columns CSS classes, or you can create your own custom CSS and specify the selectors
    css="custom-css-class"
  • Tile Pattern: order of the HTML tags (image, title, text, link).
    elements="3"
  • Select The Latest From Taxonomy
    • Taxonomy*
      taxonomy="category"
    • Term
      term="samples"
  • Select The Latest Posts With The Tag
    • Tag
      tag="photography"
    • Dynamic: No, use the selected ones, or Yes, use the current post tags (this option is useful when you want to display related content on a page)
      dtag="yes"
    • Exclude Posts with Tags
      exclude_tags="slug1,slug2"
  • Select The Posts By IDs: you can specify the Post IDs
    id="10,11,23,25"
  • The Latest Posts By Parent IDs: you can specify the Parent IDs.
    parent="1,2,3"

Your potential shortcode might look similar to this:

[latest-selected-content limit="4" type="post" display="title,content-small" chrlimit="50" image="full" elements="0" css="two-columns" taxonomy="category" term="samples" orderby="dateA"]
Iulia Cazan
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.