Lightweight Related Posts BCTeam
Lightweight Related Posts BCTeam
Description
Lightweight Related Posts BCTeam adds a related posts section to your site without extra scripts, remote APIs, or tracking.
It is tested with WordPress 7.1, including the always-iframed post editor and Block API version 3.
What it does
- Matches posts by category, tag, both, either, or a specific category
- Fills empty slots with latest or random posts so the section stays useful
- Shows automatically after content or just before comments
- Adds a Gutenberg block with live preview and sidebar controls
- Adds the
[lwrpbct_related]shortcode and a theme template tag - Lets you hide the section on any single post
- Caches results and clears the cache when you save a post or settings
Layouts and design
- Five layouts: card grid, list, compact, mosaic, and image overlay
- Modern, minimal, and classic styles
- 1–4 columns, accent color, image size, and excerpt length
- Responsive on phones and tablets, with reduced-motion support
Ways to display
- Turn on auto-display in Settings Related Posts
- Insert the Related Posts block in the editor
- Use
[lwrpbct_related num="4" layout="grid"] - Call
<?php lwrpbct_the_related_posts(); ?>in a theme template
Developers can filter lwrpbct_query_args and lwrpbct_related_html.
Installation
- Upload the plugin folder to
/wp-content/plugins/ - Activate Lightweight Related Posts BCTeam
- Go to Settings Related Posts
- Choose matching, layout, and whether to auto-display
Faq
Yes. The block uses API version 3, block.json, and usesContext so it works in the iframed post editor. Styles are loaded with editorStyle / style handles instead of admin-only CSS.
Yes. Search for “Related Posts”. You can use the plugin defaults or override layout, count, and matching on that block only.
Yes. Use the shortcode, or keep auto-display on for single posts.
Use the fallback setting: latest posts, random posts, or show nothing.
Queries use WP_Query with no_found_rows. Results are cached in transients and refreshed when content or settings change.
Yes. Open the post and check Hide related posts on this entry in the Related Posts box.
No. There is no tracking, and no required “powered by” link.
Reviews
Changelog
2.0.0
- Declared compatibility with WordPress 7.1
- Rebuilt the Gutenberg block on Block API v3 with
block.jsonand iframe-safe editor code - Added matching modes, fallback fill, exclude lists, and post-type targeting
- Added five layouts, three visual styles, accent color, and author / read-more options
- Added transient cache, per-post hide control, and a modern tabbed settings screen
- Moved styles out of inline HTML and fixed version / sanitization issues
- Requires WordPress 6.3+
1.1.0
- Fixed category matching so the current post is excluded
- Latest posts first with a random fallback
- Added date format selection
1.0.1
- WordPress.org compliance updates
1.0.0
- Initial release



