Beschrijving
Latest Content by Anything
Beschrijving
Latest Content by Anything is a lightweight yet powerful shortcode plugin that displays your latest content from any post type with flexible taxonomy filtering.
Key Features
- Universal Post Type Support – Works with posts, pages, WooCommerce products, and ANY custom post type
- Taxonomy Filtering – Filter by category, tag, or any custom taxonomy
- WooCommerce Integration – Automatically displays product prices when showing products
- Flexible Layouts – Choose between horizontal or vertical layouts
- Customizable Display – Control titles, excerpts, thumbnails, and more
- Developer Friendly – Clean code with proper escaping and sanitization
- Lightweight – No bloat, minimal CSS, no jQuery dependency
Use Cases
- Display latest blog posts on your homepage
- Show featured products from a specific WooCommerce category
- Create a portfolio grid from custom post types
- Build related content sections
- Display team members from a custom post type
- Show testimonials filtered by service type
- Feature recent news articles by category
Basic Usage
Simply add this shortcode to any page, post, or widget:
[latest_content_by_anything] WooCommerce Example
Display your latest products with prices:
[latest_content_by_anything post_type="product" num_items="4" layout="horizontal"] Pro Features
Looking for more? Latest Content by Anything Pro adds:
- Multiple design templates
- Visual shortcode builder
- AJAX pagination (load more)
- Masonry and carousel layouts
- Gutenberg block
- Custom field display (ACF compatible)
- Priority support
Shortcode Parameters
Display Options
num_items– Number of items to display (default: 5)post_type– Post type to query: post, page, product, or any CPT (default: post)display_titles– Show post titles: true or false (default: true)excerpt_length– Excerpt length in words, 0 to hide (default: 100)thumbnail_size– WordPress image size: thumbnail, medium, large, full (default: thumbnail)
Filtering Options
taxonomy– Taxonomy slug to filter by (e.g., category, product_cat)term– Term slug within the taxonomy to filter by
Layout Options
layout– Display layout: vertical, horizontal, or grid (default: vertical)columns– Number of columns for grid layout, 1-6 (default: 3)
Sorting Options
orderby– Sort by: date, title, modified, rand, menu_order (default: date)order– Sort direction: ASC or DESC (default: DESC)
Additional Options
exclude– Comma-separated post IDs to excludeoffset– Skip the first N posts (default: 0)show_date– Display post date: true or false (default: false)show_author– Display author name: true or false (default: false)show_read_more– Add “Read More” link: true or false (default: false)read_more_text– Custom “Read More” text (default: Read More)cache– Enable query caching: true or false (default: true)
WooCommerce Options
hide_price– Hide product prices: true or false (default: false)
Complete Example
[latest_content_by_anything num_items="6" post_type="product" taxonomy="product_cat" term="featured" thumbnail_size="medium" excerpt_length="20" display_titles="true" layout="horizontal" hide_price="false" ]<h3>Additional Resources</h3> * Full Documentation – Detailed guides and examples
* Feature Requests – Suggest new features
* Pro Version – Unlock advanced features
Installatie
Automatic Installation
- Go to Plugins > Add New in your WordPress admin
- Search for “Latest Content by Anything”
- Click Install Now, then Activate
Manual Installation
- Upload the
latest-content-by-anythingfolder to/wp-content/plugins/ - Activate through the ‘Plugins’ screen in WordPress
- Use the
[latest_content_by_anything]shortcode anywhere
FAQ
How do I display WooCommerce products?
Use
post_type="product"in your shortcode:[latest_content_by_anything post_type="product" num_items="4"]To filter by a product category, add the taxonomy and term:
[latest_content_by_anything post_type="product" taxonomy="product_cat" term="clothing"]How do I filter posts by category?
Use the taxonomy and term parameters:
[latest_content_by_anything taxonomy="category" term="news"]For tags, use:
[latest_content_by_anything taxonomy="post_tag" term="featured"]Can I use custom post types?
Yes! Replace “post” with your custom post type slug:
[latest_content_by_anything post_type="portfolio"] [latest_content_by_anything post_type="testimonials"]How do I create a horizontal layout?
Use the layout parameter:
[latest_content_by_anything layout="horizontal" num_items="4"]Does it work with Elementor?
Yes! Simply add the shortcode using Elementor’s Shortcode widget. The plugin has been tested with Elementor and works without any issues.
Does it work with WPBakery Page Builder?
Yes, the shortcode works perfectly in WPBakery’s Text Block or Raw HTML elements.
Does it work with the Gutenberg block editor?
Yes! Use the Shortcode block in Gutenberg to add the shortcode. The Pro version includes a native Gutenberg block with a visual interface.
Can I hide the featured image/thumbnail?
Set an empty or invalid thumbnail size, or you can style it with CSS:
.latest-content .content-item img { display: none; }How do I change the excerpt length?
Use the excerpt_length parameter (in words):
[latest_content_by_anything excerpt_length="20"]To hide the excerpt entirely, set it to 0:
[latest_content_by_anything excerpt_length="0"]Can I display posts in random order?
Currently, posts are displayed by date (newest first). Random ordering is available in the Pro version.
Is the plugin translation ready?
Yes, the plugin uses WordPress internationalization standards with the text domain ‘latest-content-by-anything’.
How do I style the output?
The plugin uses CSS classes you can target in your theme’s stylesheet:
.latest-content– Main container.content-item– Individual item wrapper.content-title– Post title.content-excerpt– Excerpt text.product-price– WooCommerce price (products only).horizontal-layout– Applied when layout=”horizontal”.vertical-layout– Applied when layout=”vertical”
What CSS classes are available for styling?
Example custom CSS:
.latest-content .content-item { background: #fff; border: 1px solid #eee; padding: 20px; } .latest-content .content-title a { color: #333; text-decoration: none; } .latest-content .content-title a:hover { color: #0073aa; }Does the plugin slow down my site?
No, the plugin is very lightweight. It makes a single database query and outputs minimal HTML and CSS. The Pro version adds optional caching for even better performance on high-traffic sites.
Is there a Pro version?
Yes! Latest Content by Anything Pro adds design templates, visual shortcode builder, AJAX pagination, Gutenberg block, and more.
Beoordelingen
Bijdragers & ontwikkelaars
“Latest Content by Anything” is open source software. De volgende personen hebben bijgedragen aan deze plugin.
BijdragersVertaal “Latest Content by Anything” in je eigen taal.
Interesse in ontwikkeling?
Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.
Changelog
2.0.0 – 2025-01-17
- NEW: Grid layout with customizable columns (1-6)
- NEW: Sorting options – orderby and order parameters
- NEW: Display post date with show_date parameter
- NEW: Display author with show_author parameter
- NEW: “Read More” link option with customizable text
- NEW: Exclude specific posts by ID
- NEW: Offset parameter to skip posts
- NEW: Query caching for improved performance
- NEW: Admin documentation page under Settings
- NEW: CSS custom properties for easy theming
- NEW: Responsive grid layouts
- IMPROVED: Modern class-based architecture
- IMPROVED: Better code organization and documentation
- Fixed: WooCommerce compatibility – no longer causes errors on sites without WooCommerce
- Fixed: Frontend compatibility issue with plugin detection
- Updated: Minimum WordPress version 5.0
- Updated: Minimum PHP version 7.4
1.0.14
- Fixed: WooCommerce compatibility – no longer causes errors on sites without WooCommerce installed
- Fixed: Frontend compatibility issue with plugin detection function
- Updated: Tested up to WordPress 6.7
- Improved: Better code standards and security practices
1.0.13
- Minor bug fixes
- Improved documentation links
1.0.12
- Fixed: Error with WooCommerce categories
- Fixed: Error with WooCommerce price display
1.0
- Initial release




