Latest Post Shortcode

Latest Post Shortcode | Iulia Cazan

Description

The “Latest Post Shortcode” helps you display a list or grid of the posts or pages in a page/sidebar, without having to code or know PHP. You can embed as many shortcodes in a page as you need, each shortcode configured in a different way. The shortcode for displaying the latest posts is [latest-selected-content] and can be generated very easy, the plugin will add a block or a shortcode button in the editor area.
The “Latest Post Shortcode” is configurable and allows you to create a dynamic content selection from your posts, pages and custom post types by combining, limiting and filtering what you need. The output parameters are extremely flexible, allowing you to choose the way your selected content will be displayed.

You can write your own “read more” replacement, choose wether to show/hide featured images, you can even sort the items by a number of options, paginate the output (also AJAX pagination).
This plugin should work with any modern theme.

When used with WordPress >= 5.0 + Gutenberg, the plugin shortcode can be configured from the LPS block or from any Classic block, using the plugin button.

Demo

Usage example

[latest-selected-content perpage="4" showpages="4" display="title,date,excerpt-small" chrlimit="120" url="yes" linktext="Read more" image="thumbnail" elements="3" css="four-columns tall as-overlay light" type="post" status="publish" orderby="dateD" show_extra="ajax_pagination,light_spinner,pagination_all,date_diff,category,hide_uncategorized_category"]

or simply

[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"]

Starting with version 8.0, the plugin has a new UI and some new cool features. With this version, the output of the shortcode can be configured also as a slider, with responsive and different modes options. In this way, if you previously used the Latest Post Shortcode Extension, this is no longer needed, the plugin handles all by itself.

Starting with version 7.0, the plugin implements new hooks that allows for defining and managing your own custom output, through your theme or your plugins. The new hooks are:
lps_filter_tile_patterns and lps_filter_display_posts_list – allows you to add your custom patterns
lps_filter_use_custom_tile_markup – allows you to define your custom tile markup
lps_filter_use_custom_section_markup_start and lps_filter_use_custom_section_markup_end – allows you to control the shortcode markup that is shown before and after the tiles block.
Check more hooks details and code sample at https://iuliacazan.ro/latest-post-shortcode/.

Hooks

admin_enqueue_scripts, init, plugins_loaded, media_buttons_context, admin_footer, admin_head, wp_head, lps_filter_tile_patterns, lps_filter_display_posts_list, lps_filter_use_custom_tile_markup, lps_filter_use_custom_section_markup_start, lps_filter_use_custom_section_markup_end, lps_filter_use_custom_shortcode_arguments, lps_filter_use_custom_query_arguments

License

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Version history

9.6.5 – Restore the post object inside the legacy custom templates.
9.6.4 – Assets optimization, Elementor block icons update for dark mode.
9.6.3 – Tested up to 5.5, icon update.
9.6.2 – Tested up to 5.4.2, added the LPS / Latest Post Shortcode Gutenberg block, added the option to sort the posts ascending/descending by ID.
9.6.1 – Fix the tiles variable height when not using columns.
9.6 – Tested up to 5.4., fix tiles stripped attributes, added the CSS helper, added more options for responsive tiles, added the clear overlay, added the hover scale effect, added experimental horizontal tile, fix for Elementor preview update, added post classes.
9.5.1 – Added the cache feature, up arrow in small resolution, support for 5 and 6 columns, support for aligning the tile content, fix limit attribute update, demo video, screenshots update.
9.5 – Tested up to 5.3.2, infinite scroll option, slider wrapper element, pagination limit, multiple placeholders, UI styles update, enqueue updates.
9.4 – Tested up to 5.3, align the pagination to center or to right.
9.3 – Tested up to 5.2.2., added $args argument for the custom tile markup filter, added sticky posts filter, added one more taxonomy filter, added the option for line break after the shortcode
9.2.1 – Added caption extra option, selectable mime type position, tested with Elementor 2.5.15, tested up to 5.2.
9.2 – Fix no link for tiles using as-overlay class, new option to hookup the media link and media lightbox (integrate with Easy FancyBox and FooBox Image Lightbox)
9.1 – Fix attachment multiple status filters, added extra options for showing the mime type for attachments as text or/and as CSS class for the tile wrapper
9.0 – Tested up to 5.1.1, added the attachment tiles, added date range and dynamic range filtering for items
8.7 – Tested up to 5.1, title wrap, new tile patterns, raw content, support for Elementor
8.61 – Fix resize when used with Gutenberg
8.6 – Tested up to 5.0.1, support for four columns, support for tiles overlay, better translation
8.5 – Fix multiple terms filter, date difference update
8.4 – Tested up to 4.9.8, load more option, AJAX spinners, date difference option, excerpt and content pattern, slider without images
8.3 – Tested up to 4.9.7, exclude by tags and by categories, plugin translations
8.2 – Pagination update, SEO improvement, Gravity Forms compatibility
8.1 – Added missing assets
8.0 – New UI, new content filters, placeholder, output as slider options, tested up to 4.9.6.
7.4 – Filters for shortcode arguments and shortcode query, filter by author, tested up to 4.8.2.
7.3 – Added the option to show the author, categories and tags before or after specific tile elements.
7.2 – Exclude dynamic content already exposed in the current page.
7.1 – Extra options to display author and taxonomies, and order by random
7.0 – Introduce hooks for allowing the definition of custom output and the new UI
6.4 – Three columns style fix, tested up to 4.8
6.3 – Fix parents list, tested up to 4.4.2
6.2 – Add status support and exclude by tags support
6.1 – Apply more filters
6.0 – Add support for the Latest Post Shortcode Slider extension
5.4 – Separate the content and excerpt filters
5.3 – Open links in a new window
5.2 – Render full post content
5.1 – Posts order and ajax pagination
5.0 – Extra tags display and text widget filter
4.2 – Post date option
4.1 – Compatibility update
4.0 – Pagination position and dynamic tag
3.1 – Dynamic image dropdown option
3.0 – Pagination options
2.0 – Visual pattern selector and more features
1.0 – Initial version.

Installation

  • Upload Latest Post Shortcode to the /wp-content/plugins/ directory of your application
  • Login as Admin
  • Activate the plugin through the ‘Plugins’ menu in WordPress

Plugin author

Iulia Cazan

Plugin official website address

https://wordpress.org/plugins/latest-post-shortcode/
If you encounter problems in using the Latest Post Shortcode plugin, you can comment below, and I will try my best to help you solve the problem

Leave a Comment

Your email address will not be published.