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.

Download plugin from WordPressYou can find here details of the Latest Post Shortcode 9.0 new features.

== Summary for 9.0 version ==


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 images 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 dates. 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 rang 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,show_mime_class"]

For styling purpose, I added on 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 span:first-of-type {
	background: rgba(255,255,255,0.5);
	color: #000;
	display: block;
	font-size: 10px;
	padding: 0 5px;
	position: relative;
	text-align: right;


Other updates

  • The plugin has been tested up to WordPress 5.1.1
  • Added the tile image alt attribute
  • Fixed the as-overlay tiles without links

Extended available options, technical & non-technical details common for ver < 9.0

Support my work! Click the button below
Support my work! Buy me a coffee
Share the article
  • Distribuie pe LinkedIn