Latest Post Shortcode 8.0
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.
What is New?
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 it all by itself.
The Plugin Button
The plugin button is available in the editor and quick tags menus, and also in the Text widgets. The button has been moved to the menu, please look for the indigo icon when you are using the visual mode of the editor, or the LPS button when you are using the text mode of the editor or the quick tags. This change was made to prepare the plugin for the new releases that will include Gutenberg, as in the new versions some hooks will no longer be available, and this felt like the right place to move the button.
The button in the visual mode
The button in the text mode
The Plugin New UI
The shortcode settings have been grouped into 5 sections:
- Output Type
- Content & Filters
- Limit & Pagination
- Display Settings
- Extra Options
By clicking on the left-hand side items or by scrolling in the right-hand side area you can navigate to the desired section of settings for the shortcode. When you are making changes, the preview of the shortcode will be available on the screen.
Output as Posts Grid Options
Example of tiles display, the shortcode, and the output:
[latest-selected-content limit="8" display="title" titletag="b" url="yes" image="thumbnail" elements="3" css="four-columns align-left as-overlay tall dark hover-zoom" type="post" status="publish" orderby="dateD"]
POST TYPES, STATUS & ORDER
- POST TYPE: this is dynamic, depending on the statuses registered in your application;
- POST STATUS: this is dynamic, depending on the statuses registered in your application;
- ORDER BY: Date, Menu, Title, Random;
FILTER BY TAXONOMY
- TAXONOMY: the taxonomy for which to show the items;
- TERM: term slug (ex: news);
FILTER BY TAG
- TAG: provide a tag to filter the content;
- DYNAMIC: previous shortcodes – the exclude content dynamic option will filter the content so that the posts that were already embedded by previous shortcodes on this page will not show up (so that the content does not repeat).
FILTER BY SPECIFIC IDS
- POST ID: show only objects with the selected IDs, separate IDs with a comma;
- PARENT ID: show only objects with the selected parents, separate IDs with a comma;
- AUTHOR ID: show only objects with the selected author IDs, separate IDs with a comma;
EXCLUDE CONTENT
- CURRENT: the current post
- DYNAMIC: previous shortcodes – the exclude content dynamic option will filter the content so that the posts that were already embedded by previous shortcodes on this page will not show up (so that the content does not repeat);
- NEW BY POST ID: exclude the objects with the selected IDs, separate IDs with a comma;
- NEW BY AUTHOR ID: exclude the objects with the selected author IDs, separate IDs with a comma;
- NEW BY TAGS: exclude the objects with the selected tags, separate slugs with a comma;
- NEW BY CATEGORIES: exclude the objects with the selected categories, separate slugs with a comma;
LIMIT & PAGINATION
- NUMBER OF POSTS: the maximum number of posts the shortcode will expose. However, if you are using pagination, the number of posts does not apply, it will be overwritten by the number of records per page;
- RECORDS PER PAGE: how many items to show on a page when using pagination;
- OFFSET: from which item to start;
- VISIBILITY: hide or show the pagination links;
- POSITION: the pagination links position;
- AJAX PAGINATION: if the pagination will use ajax calls or not;
POST APPEARANCE
- DISPLAY POST: which combination of attributes each post will present on the front-end, including also custom templates (see the hooks section);
- CHARS LIMIT: the maximum number of chars from excerpt/content to be displayed (the text will be truncated, but will not break words);
- USE POST URL: yes or no, with opening the links in the same or new window;
- CUSTOM ‘Read more’ MESSAGE: Do not use brackets for the custom read more message, these are shortcodes delimiters.
- USE IMAGE: this is dynamic, depending on the image size registered in your application;
- NEW IMAGE PLACEHOLDER: define an image to be used for the posts that do not have a featured image, so that the lists/grid looks nice;
- TILE PATTERN: tile visual output details, the icons represent the order of the HTML tags, and the links are marked with red;
EXTRA OPTIONS
Please note that if you are using a custom output template defined in your theme, the author, the taxonomies, and the tags extra options will not function, since your custom template is overriding the output and the default behavior.
- SHOW AUTHOR: perhaps display the author for each post;
- SHOW CATEGORIES: perhaps display the categories for each post;
- SHOW TAGS: perhaps display the tags for each post;
- CSS CLASS: the CSS class/classes you can use to customize the appearance of the shortcode output.
Output as Slider Options
The content, filters, and limit options are the same as for the grid/list/tiles view.
Example of slider display, the shortcode, and the output:
[latest-selected-content output="slider" limit="10" image="medium" type="post" status="publish" orderby="dateD" slidermode="horizontal" slideslides="2" slidescroll="1" sliderdots="true" sliderinfinite="true" slidersponsive="yes" respondto="window" sliderbreakpoint_tablet="600" slideslides_tablet="1" slidescroll_tablet="1" sliderinfinite_tablet="true" sliderbreakpoint_mobile="480" slideslides_mobile="1" slidescroll_mobile="1" sliderinfinite_mobile="true" slidegap="10" sliderheight="fixed" slidermaxheight="180" slidercontrols="true" sliderauto="true" sliderspeed="3000" chrlimit="220" url="yes"]
SLIDER SETTINGS
- NEW SLIDES TRANSITION: horizontal, vertical or fade;
- NEW CENTER MODE: the center mode is intended to works for the cases when you are showing more slides per row, and works better when you use an odd number of slides (3, 5, etc.), so, if your slider is presenting one slide at a time, you might want to switch this option off;
- NEW CENTER MODE PADDING: the value in pixels for the padding of the center slide;
- NEW AUTO PLAY: yes or no;
- NEW SPEED: speed in milliseconds for the transitions;
- NEW HEIGHT: adaptive or fixed, this depends on the image size you select;
- NEW MAXIMUM HEIGHT: when using a fixed height you have to provide the value in pixels for the maximum height of the slider;
- NEW SHOW SLIDE OVERLAY: the slide will display over the image the title and few chars from the excerpt (what you define for the Post Appearance > Chars Limit below);
- NEW SLIDES GAPS: this is useful when you want to display more visible slides in the row;
- NEW SLIDES TO SHOW: number of slides to show in a row;
- NEW SLIDES TO SCROLL: how many slides to transition at once;
- NEW SHOW DOTS: show or hide the navigation dots;
- NEW INFINITE SCROLL: use infinite scroll;
- NEW NEXT/PREVIOUS: show or hide the navigation arrow;
- NEW RESPONSIVE: if the slider has responsive settings;
RESPONSIVE SLIDER SETTINGS
- NEW RESPOND TO: window, slider or min; width that responsive object responds to, the min (default) option means the smaller of the window or slider;
- NEW TABLET BREAKPOINT: media breakpoint in pixels;
- NEW TABLET SLIDES TO SHOW: number of slides to show in a row;
- NEW TABLET SLIDES TO SCROLL: how many slides to transition at once;
- NEW TABLET SHOW DOTS: show or hide the navigation dots;
- NEW TABLET INFINITE SCROLL: use infinite scroll;
- NEW MOBILE BREAKPOINT: media breakpoint in pixels;
- NEW MOBILE SLIDES TO SHOW: number of slides to show in a row;
- NEW MOBILE SLIDES TO SCROLL: how many slides to transition at once;
- NEW MOBILE SHOW DOTS: show or hide the navigation dots;
- NEW MOBILE INFINITE SCROLL: use infinite scroll.
You can download the free plugin from the WordPress repository.