Deskripsi
Showcase your latest posts, articles, or WooCommerce products in a stylish grid or list – via shortcode or a native block.
RW Recent Post displays your latest content in a visually appealing grid or list layout, complete with featured images, excerpts, and optional post dates. WooCommerce sites can also show a “Buy Now” button on recent products.
Features
- Native Gutenberg block with live preview and an inspector panel for all settings
- Backward-compatible
[rwrpt_recent_post]shortcode - Grid, list, or simple view styles
- Works with any public post type, including WooCommerce products
- Admin screen to build and manage reusable shortcode presets
- Assets only load on pages that actually use the block/shortcode
Blok
Plugin ini menyediakan 1 blok.
- Recent Post Showcase recent posts, articles, or WooCommerce products in a grid or list.
Instalasi
- Upload the
rw-recent-postfolder to/wp-content/plugins/. - Activate the plugin through the “Plugins” menu in WordPress.
- Add the “Recent Post” block from the block inserter, or use the shortcode below.
Shortcode
[rwrpt_recent_post title="Recent Product" posted_date="false" number_of_post=10 post_type="product" view_style="list"]
title– Heading of the listing.posted_date– Show/hide the date (true/false).number_of_post– Number of posts to display (1–100).post_type– Any registered post type slug.view_style–grid,list,carousel, or omit for a simple bulleted list.columns– Number of grid columns:2,3, or4(grid view only).excerpt_length– Number of words in the excerpt,0to hide it (0–100).show_image– Show/hide the featured image (true/false).carousel_nav– Show/hide the carousel’s prev/next navigation arrows (true/false, carousel view only).carousel_pagination– Show/hide the carousel’s clickable pagination bullets (true/false, carousel view only).
Ulasan
Belum ada ulasan untuk plugin ini.
Kontributor & Pengembang
“RW Recent Post” adalah perangkat lunak open source. Berikut ini mereka yang sudah berkontribusi pada plugin ini.
KontributorTerjemahkan “RW Recent Post” dalam bahasa Anda.
Tertarik mengembangkan?
Lihat kode, periksa repositori SVN , atau mendaftar ke log pengembangan melalui RSS.
Log Perubahan
2.6.0
- Fixed: featured image layout could look broken/inconsistent on other sites. Root cause: the image box was sized off each site’s own
thumbnailsetting (Settings Media), which isn’t the same dimensions or aspect ratio on every WordPress install – a site with a square or unusually-shaped thumbnail setting produced a visibly different, sometimes broken-looking layout than the site the plugin was built against. - Also fixed: the carousel view had no image-sizing CSS at all – only grid and list were covered – so carousel images could render at their raw, unconstrained native size.
- Also fixed: list view hard-coded a fixed 200px pixel height for images instead of a scalable ratio.
- Image boxes are now locked to a consistent aspect ratio (16:9 for grid/carousel, 4:3 for list) with
object-fit: cover, applied identically across all three view styles via one shared rule – so the layout looks the same regardless of what any given site’s thumbnail setting produces. - Images now also output real
width/heightHTML attributes (fetched viawp_get_attachment_image_src()) so the browser can reserve the correct space before the image loads, reducing layout shift – separate from, and in addition to, the fixed-ratio display box above.
2.5.2
- Fixed: the carousel didn’t slide at all and threw
Failed to execute 'getComputedStyle' ... parameter 1 is not of type 'Element'on the live front end (not just the editor). Root cause: Swiper requires its.rwrpt-swiper-wrapperelement to be a direct child of the element it’s initialized on (it looks it up viaelement.children, not a deep query). The 2.5.0 fix for the “peeking slide” bug nested the wrapper one level deeper (inside a new.rwrpt-swiper-trackelement) without updating which element gets handed to Swiper, so Swiper could no longer find its own wrapper and crashed on the first style read it tried to do. Swiper is now correctly initialized on the track element itself. Verified against the real Swiper 14.1.0 bundle in a real DOM (not just code review) before shipping this fix.
2.5.1
- Fixed:
Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'thrown by Swiper in the block editor. Caused by the editor canvas being an iframe – a script loaded there via the carousel block’s live preview (ServerSideRender) could end up running against a different window/document than the elements it queried. The carousel’s JS is now skipped during block-renderer REST requests (i.e. editor previews); the editor still shows the styled carousel markup, just non-interactive there, and the front end is unaffected. - Added defensive guards in the carousel init script (document-realm check, try/catch isolation per instance) as a second line of defense against the same class of bug in other contexts (e.g. page-builder live previews).
- The carousel init script now also picks up carousels inserted into the page after the initial load (AJAX-loaded content, etc.) via a MutationObserver.
2.5.0
- Fixed: carousel nav arrows could drift far below the images when one card had a much longer excerpt than its siblings – the container’s height (and the arrows’ 50%-vertical-center position) was based on the tallest card in the whole deck rather than the visible cards.
- Fixed: a sliver of the adjacent slide could peek out from behind the nav arrows, because the reserved padding for the arrows sat inside the carousel’s overflow-clipping boundary. Restructured so the clip boundary is a dedicated inner element that excludes that padding.
- Fixed: carousel card titles and excerpts weren’t picking up the plugin’s card styling (bold title, spacing) – the CSS selectors only covered grid/list layouts.
- Card titles and excerpts are now clamped to a fixed number of lines (2 and 3 respectively) so card heights stay consistent across a deck regardless of how long individual posts’ titles/excerpts are. Applies to grid, list, and carousel.
- Carousel now uses Swiper’s
autoHeight, so the container height tracks the currently-visible slide(s) as you navigate instead of staying pinned to the tallest slide in the whole deck.
2.4.0
- Added edit support to the admin shortcode builder – the “All Shortcodes” list now has an Edit action alongside Delete, opening a pre-filled form that updates the existing preset instead of creating a new one.
- Shortcode presets can now have every option changed after creation (title, post type, count, view style, columns, excerpt length, image/nav/pagination toggles) without deleting and recreating them.
2.3.0
- Fixed: carousel navigation arrows could render as empty circles with no visible icon (Unicode glyph rendering issue). Replaced with inline SVG chevrons that always render regardless of theme fonts/colors.
- Restyled navigation buttons: shadow, hover state, focus outline, disabled state at the first/last slide.
- Added
carousel_navoption – show/hide the prev/next navigation arrows (default: shown). - Added
carousel_paginationoption – show/hide clickable pagination bullets (default: hidden). - Both new options are available in the block inspector (carousel view only), the shortcode, and the admin shortcode builder.
2.2.0
- Carousel view rebuilt on Swiper.js (bundled locally with the plugin, MIT licensed) instead of a plain CSS scroll container. Fixes a visual bug where the browser’s native scrollbar showed through and clipped the last card.
- Swiper is scoped with plugin-specific class names (
rwrpt-swiper-*) and script/style handles, so it won’t collide with a theme or another plugin that already loads its own copy of Swiper (or a different slider library) on the same page. - No jQuery dependency for the carousel.
2.1.0
- Added grid column control (2/3/4 columns).
- Added a new carousel view style (build-free, CSS scroll-snap + small vanilla JS controller, only loaded on pages that use it).
- Added configurable excerpt length (0 to hide the excerpt entirely).
- Added a toggle to hide the featured image.
- Shortcode builder admin screen and shortcode output updated to include the new options.
2.0.0
- Full rewrite: modern autoloaded architecture, PSR-4-style namespacing.
- Added native Gutenberg block (dynamic, server-rendered) alongside the existing shortcode.
- Fixed: the internal shortcode-preset post type was never registered, so the admin “Add/All Shortcode” screens silently failed to work. Now fixed.
- Security: added nonce verification and capability checks to all admin form submissions and delete actions (previously missing).
- Security: all dynamic output is now escaped (
esc_html,esc_attr,esc_url); all input sanitized and validated on read. - Assets now only enqueue on pages that actually contain the block/shortcode, instead of site-wide.
- Added translation-ready strings (text domain:
rw-recent-post). - Added
uninstall.phpcleanup for shortcode preset data. - Removed dead
marqueeattribute (feature was removed in 1.1.1 but the attribute lingered).
1.1.2
- Added new feature in backend for managing shortcodes.
1.1.1
- Added grid view and list view.
- Removed marquee.
1.1
- Added WooCommerce product buy button.








