=== Lightweight Related Posts BCTeam === Contributors: blgctterai Donate link: https://blogcutter.com Tags: related posts, gutenberg, shortcode, performance, categories Requires at least: 6.3 Tested up to: 7.1 Stable tag: 2.0.0 Requires PHP: 7.4 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Show related posts by category and tag. Auto-display, Gutenberg block, and shortcode. Built for WordPress 7.1. == 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 = 1. Turn on auto-display in **Settings → Related Posts** 2. Insert the **Related Posts** block in the editor 3. Use `[lwrpbct_related num="4" layout="grid"]` 4. Call `` in a theme template Developers can filter `lwrpbct_query_args` and `lwrpbct_related_html`. == Installation == 1. Upload the plugin folder to `/wp-content/plugins/` 2. Activate **Lightweight Related Posts BCTeam** 3. Go to **Settings → Related Posts** 4. Choose matching, layout, and whether to auto-display == Frequently Asked Questions == = Does it work with WordPress 7.1? = 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. = Does it work with the block editor? = Yes. Search for “Related Posts”. You can use the plugin defaults or override layout, count, and matching on that block only. = Can I use it with a page builder? = Yes. Use the shortcode, or keep auto-display on for single posts. = What if a post has no related category or tag? = Use the fallback setting: latest posts, random posts, or show nothing. = Will it slow the site down? = Queries use `WP_Query` with `no_found_rows`. Results are cached in transients and refreshed when content or settings change. = Can I hide related posts on one article? = Yes. Open the post and check **Hide related posts on this entry** in the Related Posts box. = Does it phone home or add credits on the front end? = No. There is no tracking, and no required “powered by” link. == Changelog == = 2.0.0 = * Declared compatibility with WordPress 7.1 * Rebuilt the Gutenberg block on Block API v3 with `block.json` and 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 == Upgrade Notice == = 2.0.0 = WordPress 7.1 support, a new settings screen, smarter matching, and extra layouts. Your existing settings are kept and new options are filled in with defaults.