Latest Post Shortcode 1.0
The plugin registers a configurable shortcode that allows you to create a dynamic content selection from your posts, pages, and custom post types by combining and filtering what you need.
What Does it Do?
The plugin registers a configurable shortcode that allows you to create a dynamic content selection from your posts, pages, and custom post types by combining and filtering what you need.
Settings
The shortcode settings are:
- Number of Posts: the number of items to display if there is no pagination.
- Pagination: No pagination, Paginate results. For the paginate results, there are extra available options
- Records Per Page
- Offset
- 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)
- Pagination Position: Above the results, Below the results, Above & Below the results
- Post Type*: the post types to be selected
- Display Post: the details to display for each post. The options are: Title, Title + Post Excerpt, Title + Post Content, Title + Few Chars From The Excerpt, Title + Few Chars From The Content, Date, Title + Date, Title + Date + Post Excerpt, Title + Date + Post Content, Title + Date + Few Chars From The Excerpt, Title + Date + Few Chars From The Content, Date + Title, Date + Title + Post Excerpt, Date + Title + Post Content, Date + Title + Few Chars From The Excerpt, Date + Title + Few Chars From The Content.
- Chars from excerpt/content: this will allow specifying the number of chars for the options that require a few chars,
- Use Post URL: No link to the post, Link to the post, Link to the post (_blank)
- Extra Options: Show post tags, Ajax Pagination
- Order by: Date DESC, Date ASC, Menu Order ASC, Menu Order DESC, Title ASC, Title DESC
- Status: filters the post statuses you want to be exposed (this is a dynamical option, the list of post statuses will include the native statuses and the post statuses registered in your application by the other plugins)
- Use Image*: No image or one selected image size
- 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
- Tile Pattern: order of the HTML tags (image, title, text, link). If you use the “No link to post” option, the tile patterns available are:
And when using links to posts, the tile patterns are these (the links ranges are marked with red) - Select The Latest From Taxonomy
- Taxonomy*
- Term
- Select The Latest Posts With The Tag
- Tag
- 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)
- Select The Posts By IDs: you can specify the Post IDs
- The Latest Posts By Parent IDs: you can specify the Parent IDs.
There are some other options that can be configured, for example, to exclude posts with specific tags. This option looks like exclude_tags="slug1,slug2"
* These features are dynamic, meaning that the drop downs options are populated with entities registered in your application.
Demo
Please see below an example with four columns showing the 4 most recent items from the “My Travels” category.
[latest-selected-content limit="4" display="title,excerpt-small" titletag="h3" chrlimit="250" url="yes" image="full" elements="27" default_height="60vh" default_padding="2rem" default_gap="2rem" default_overlay_padding="2rem" css="two-columns as-overlay tall" type="post" taxonomy="category" term="travels" orderby="dateD"]
A Relaxing Autumn Break in Crete, Greece
Seeking a break from the busy summer, we escaped to Crete with our close friends, for a relaxed autumn getaway.
Testing the Ricoh GR IIIx HDF Camera on a Speed Photo Walk
This Saturday I got the opportunity to test the Ricoh GR IIIx HDF camera, by attending a photowalk with Antonio Pisani, an event organized by Focus Nordic, isopatrusute, F64 and Photo Setup, at CdRF, in Bucharest.
Summer of 2024: Festivals, Friends, and Unforgettable Moments
This summer, my husband Cezar and I embarked on an incredible journey that took us from the electrifying Tons of Rock festival in Oslo to revisiting my childhood home, and two unforgettable festivals we attend every year with friends. From the magic
Our First Trip to Finnish Lapland
Our journey through the Finnish Lapland was highlighted by the magical red Aurora and the enchanting winter landscapes.
Extra Styling Tips
If you want to add your extra styling, here are some selectors for the elements:
The CSS title selector.latest-post-selection article h1
The CSS date selector.latest-post-selection article em
The CSS time selector.latest-post-selection article em i
If you want to completely override the sample styles provided by the plugin, you can apply the custom-class (for example) in the shortcode “CSS Class Selector”, and the selector you should use would becomes similar to this.latest-post-selection.custom-class
So, if for example, I would want to hide the time and display only the date, but only for a particular list of posts (you can embed more shortcodes in the same page), I would add in my styles this line.latest-post-selection.custom-class article em i {
display: none;
}
If you want to transform your posts selections into a dynamic responsive slider, you can install the slider extension. You can find more about it at Latest Post Shortcode Slider Extension.
More details about the plugin options at Latest Post Shortcode Options Sample
You can download the free plugin from the WordPress repository.