Home My Plugins Latest Post Shortcode 9.0

Latest Post Shortcode 9.0

The features introduced in version 9.0 include the support for attachments as tiles, and date filters. The “Latest Post Shortcode” helps you display a custom selection of articles as a list, as a grid, or even as a responsive slider (posts, pages, your custom post types, attachments) in a page/sidebar, without having to code or know PHP.

Latest Post Shortcode Banner

Summary

You can download the free plugin from the WordPress repository. If you would like to support my work, please leave a 5 stars rating, or share this plugin on your feed.
A huge thanks in advance!

Support for attachments as tiles

This enhancement allows you to configure and expose the media images (attachment post type) as tiles.

If you use any advanced media library that handles image categories and tags as standard taxonomies, taxonomies terms, and post taxonomies terms relationships, you would be able to filter the images by categories and tags like any other post type.

There are two new extra options for the tiles when using the attachment post type:

  • Show mime type: this will output after the title “Mime Type: type” text
  • Show mime type as CSS class: this will add the mime type CSS class to the tile wrapper element (for example, if the attachment mime type is image/png, the classes would be item-mime-type mime-png mime-image-png)

As a note, please make sure you select the inherit status for images if you need to expose only attachments with the shortcode, as this is the native default status for this post type, instead of published.

Date filters

This is a new feature that allows you to filter the published posts by date. There are two types of date limits:

  • The range of dates: you will be able to set the after date, the before date, or both of these.

The dynamic range: you will be able to specify a dynamic range of dates, calculated based on how many months, weeks, days, or hours ago the items were published.

See below an example:

[latest-selected-content limit="4" display="title,date,content-small" titletag="h3" chrlimit="120" date_after="2019-03-10" date_before="2019-03-23" image="medium" elements="1" css="four-columns tall as-overlay light" type="attachment" status="inherit" orderby="dateD" show_extra="show_mime,taxpos_show_mime_after-date,show_mime_class"]

For styling purposes, I added to this example some minimal CSS, to make it look different, but you can style it as you need. My example style is:

article .item-mime-type {
	background: rgba(255,255,255,0.7);
	color: #000;
	display: block;
	font-size: 10px;
	padding: 0 5px;
	position: relative;
	text-align: right;
}

If you would like to support my work, please consider making a donation / buy me a coffee, leave a 5 stars rating, or share this plugin on your feed.
A huge thanks in advance!

9.0.0