Contextual Related Posts
Contextual Related Posts is a powerful WordPress plugin that displays fast, intelligent related posts to keep users on your site longer. Improve SEO, increase pageviews, and lower bounce rates — no setup needed. Key features Activate and Forget: Activate the plugin. Contextual Related Posts automatically displays related posts on your site and in your feed after the content. There is no need to edit any template files. Custom Control with Manual Install: Want placement control? You have multiple options available: Gutenberg / Block Editor support: You can easily add a “Related Posts [CRP]” block to any post or page with its options and settings. Widgets: Add related posts to any widgetized theme area, such as the sidebar or footer. You can configure the widget options to suit your needs. Shortcode: Use [crp] to display the related posts anywhere within the post content. REST API: Fetch related posts for any post ID using contextual-related-posts/v1/posts/ /. You can also use query parameters to filter or sort the results. The algorithm: Find related posts based on the current post’s title and/or content. You can also find posts by tags, categories and selected custom fields. Caching: Related posts output is automatically cached as visitors browse through your site, reducing the load on your server and improving performance. View Demo Contextual Related Posts uses an intelligent algorithm that analyzes your post’s title and/or content to find the most related ones. This way, you can show your visitors more awesome content and keep them on your site longer. With Contextual Related Posts, you can quickly boost your site’s traffic, reduce bounce rates, and refresh old entries. It’s fast, flexible, and easy to use. Try it today and see the difference for yourself! Additional features include: Exclusions: Exclude posts from specific categories or tags from being displayed in the related posts list. Custom post types: The related posts list supports posts, pages, attachments, or any other custom post type on your site. Thumbnail support: Display thumbnails or not! Styles: The output of the related posts list is wrapped in CSS classes that allow you to style it easily using custom CSS code. Customizable output: Display post excerpts in the related posts list. Customize the HTML tags and attributes used to display the output. Extendable code: Many filters and actions allow developers to easily add features, modify outputs, or integrate with other plugins. MySQL FULLTEXT indices On activation, the plugin creates three MySQL FULLTEXT indices (or indexes), which are leveraged to find the related posts. Learn more about how the algorithm works. If you’re running a multisite installation, an index is created for each blog upon activation. These indices occupy space in your MySQL database but are essential for running the plugin. Two options on the settings page allow you to remove these indices when deactivating or deleting the plugin. The latter is true by default. 💼 Features Exclusive to CRP Pro CRP Pro supercharges your related posts with advanced customization, better performance, and powerful content strategy tools. 🚀 Performance Enhancements Efficient Content Storage and Indexing: Speed up your site with optimized custom tables and efficient database indices for lightning-fast queries. Cache Setting: Fine-tune your performance with configurable cache times from 1 hour to 1 year. Server Load Threshold: Prevent CRP from running queries when the database is under heavy load. Bot Protection: Skip CRP processing for known bots and crawlers using an extensible signature list, saving server resources. Lazy Loading: Load related posts via JavaScript only when they are about to enter the viewport, speeding up the initial page load. Works across the content, shortcode, widget and block display methods and plays well with page caching plugins. 🎯 Smarter Content Matching Advanced Algorithm: Control exactly how relevant content is found by adjusting weights for title, content, and excerpt. Taxonomy Weight System: Refine your matches with precise taxonomy weighting for perfect content relationships. Keyword Override for Blocks: Set a word or phrase on the Related Posts block or the CRP Query Loop block to find related posts using that keyword instead of the current post’s title and content. 🧩 Page Builder Integrations (experimental) These integrations are new in 4.4.0 and marked experimental while they get real-world use. They are safe to use on a live site, but if one of them misbehaves in your setup, please report it on Github. WPBakery Page Builder: A native “Related Posts (CRP)” element under its own “WebberZone” tab in the Add Element panel, covering the same options as the [crp] shortcode plus custom CSS class/CSS — works in both Classic Mode and the Frontend Editor. Elementor: A native “Related Posts (CRP)” widget under its own “WebberZone” category, editable live from the widget panel and preview. Bricks Builder: A native “Related Posts (CRP)” element under its own “WebberZone” category, covering the same options as the [crp] shortcode with live dynamic data support. 🛒 WooCommerce Integration Related Products for WooCommerce: Seamlessly integrate with WooCommerce to show related products. Product Matching & Filtering: Index SKUs and attributes, filter by stock status, and use category-based recommendations with native WooCommerce styling. Display Customization: Toggle prices, ratings, and choose to replace or complement WooCommerce’s related products. Cart Related Products: Nudge customers toward free shipping by showing contextually related products priced within the gap between the cart total and the free shipping threshold. Uses CRP relevance matching anchored to the most expensive cart item, with a configurable price band, product count, heading, and cart page hook position. 📖 WooCommerce Related Products Documentation WP-CLI Support Contextual Related Posts Pro includes comprehensive WP-CLI commands for advanced management and automation. Perfect for developers, agencies, and site administrators who need powerful command-line tools. Key WP-CLI Features: Database Management: Migrate post meta, check index status, and manage database operations Cache Control: Clear, warm, enable/disable cache with multisite support Custom Table Operations: Sync content and manage FULLTEXT indexes for optimal performance Content Processing: Reprocess posts and manage related content in bulk Multisite Ready: All commands support --network flag for multisite installations 📖 Complete CLI Documentation 🎨 Advanced Design & Display Options Block Editor Integration: Create beautiful layouts with the Query Loop Block and ready-to-use block patterns including Grid, Image with Title, and more. Extra Shortcode Parameters: Unlock additional customization options for complete control over your related posts display. 📊 Analytics & Content Strategy Tools Tracking Parameters: Measure content performance with automatic UTM tracking for all related post clicks. Cornerstone Posts: Guide visitors to your most important content by featuring key articles in your related posts lists. Additional Metabox Settings: Control related content at the individual post level for perfect content relationships. GDPR Contextual Related Posts doesn’t collect personal data or send information to external services — making it GDPR-friendly by default. ⚠️ You’re responsible for ensuring your site’s overall GDPR compliance. Donations Love Contextual Related Posts? Help keep it alive! You can donate or upgrade to CRP Pro — both help support development and support. Contribute Contextual Related Posts is also available on Github. So, if you’ve got some cool feature you’d like to implement into the plugin or a bug you’ve been able to fix, consider forking the project and sending me a pull request. Bug reports are welcomed on Github. Please note Github is not a support forum, and issues that aren’t suitably qualified as bugs will be closed. Translations Contextual Related Posts is available for translation directly on WordPress.org. Check out the official Translator Handbook to contribute. Other Plugins by WebberZone Contextual Related Posts is one of the many plugins developed by WebberZone. Check out our other plugins: Top 10 – Track daily and total visits to your blog posts and display the popular and trending posts WebberZone Snippetz – The ultimate snippet manager for WordPress to create and manage custom HTML, CSS or JS code snippets Knowledge Base – Create a knowledge base or FAQ section on your WordPress site Better Search – Enhance the default WordPress search with contextual results sorted by relevance Auto-Close – Automatically close comments, pingbacks and trackbacks and manage revisions Popular Authors – Display popular authors in your WordPress widget Followed Posts – Show a list of related posts based on what your users have read WebberZone Link Warnings – Add accessible warnings for external links and target=”_blank” links
Top keywords
- related43×3.14%
- posts42×3.07%
- related posts33×2.41%
- content21×1.53%
- crp14×1.02%
- post12×0.88%
- contextual11×0.80%
- site11×0.80%
- contextual related10×0.73%
- contextual related posts10×0.73%
- display10×0.73%
- custom9×0.66%
Init Live Search – AI-Powered, Related Posts, Slash Commands
Deliver an ultra-responsive search experience to your visitors — no page reloads, no jQuery, no lag. Init Live Search is a modern, lightweight, and fully accessible live search solution for WordPress — now with native Block Editor (Gutenberg) blocks and Abilities API support (WordPress 6.9+), an optional MySQL FULLTEXT search index, optional Meilisearch integration, tag-aware matching, SEO metadata support, ACF integration, WooCommerce product filters, and customizable UI presets. It replaces the default with a clean, intuitive search modal powered entirely by the WordPress REST API. Everything loads in real-time — with zero disruption to browsing flow. Perfect for content-heavy blogs, WooCommerce stores, or even headless sites. Every interaction is fast, fluid, and designed to work across devices. Want typo-tolerant, sub-50ms relevance ranking on top of that? Connect your own self-hosted or cloud Meilisearch instance in a few clicks — Init Live Search will automatically prefer it for search, and just as automatically fall back to the built-in database search if it’s ever unreachable. Your visitors never see a broken search box. Prefer working entirely in the Block Editor? Three dynamic blocks — Live Search Box, Related Posts, and AI Related Posts — live under their own Init Live Search category in the block inserter, each with a live server-side preview as you configure it, and each sharing the exact same rendering code as its shortcode counterpart. For AI agents and automated tools, two read-only abilities (search and related posts) are also exposed through the standard WordPress Abilities API on WordPress 6.9+. It also brings AI-powered related posts and an advanced keyword generator — giving your visitors smarter ways to discover content. This plugin is part of the Init Plugin Suite — a collection of minimalist, fast, and developer-focused tools for WordPress. GitHub repository: https://github.com/brokensmile2103/init-live-search What’s New in Version 2.0.0 Abilities API support (WordPress 6.9+): search and related-posts exposed as two read-only, discoverable abilities (init-live-search/search-posts, init-live-search/get-related-posts) — optional and fully backward-compatible on older WordPress versions Block Editor (Gutenberg) support: three new blocks — Live Search Box, Related Posts, AI Related Posts — under their own block category, each with a live editor preview and sharing the same rendering code as their shortcode counterparts Requires at least raised from 5.9 to 6.9 to support the Abilities API. Requires PHP remains 7.4 What’s New in Version 1.8.x & 1.9.x Optional FULLTEXT Search Index (1.9.5): opt-in MySQL FULLTEXT-indexed table for Title/Excerpt/Content, replacing slow LIKE '%term%' scans on large sites. Off by default, auto-builds in the background via WP-Cron once enabled (no SSH/WP-CLI needed), with wp init-live-search fulltext-reindex available for a manual/faster build. See “FULLTEXT Search Index” below for details. Optional Meilisearch Integration: connect your own Meilisearch server (self-hosted or cloud) as the primary search engine Typo-tolerant, relevance-ranked, sub-50ms search results straight from Meilisearch Automatic, transparent fallback to the local database search whenever Meilisearch is disabled, unreachable, or misconfigured — search availability is never compromised New Meilisearch settings tab: Host URL, Index Name, Search Key, Admin/Indexing Key, request timeout, one-click “Test Connection”, and (1.9.5) a one-click “Reindex Now” button for sites without WP-CLI/SSH access Posts are synced automatically on publish/update/trash/delete (non-blocking — won’t slow down the editor) WP-CLI command wp init-live-search meili-reindex for bulk-indexing or rebuilding the entire index Sensitive indexing key can be defined via the INIT_LIVE_SEARCH_MEILI_ADMIN_KEY constant in wp-config.php instead of the database, for extra security AI-Powered Related Posts: brand new [init_live_search_related_ai] shortcode Uses multi-signal scoring (tags, series, title bigrams, same_keyword via ACF, category, views, comments, freshness) Shares templates with [init_live_search_related_posts] (no extra styling needed) Fully filterable via new developer hooks: ai_candidates, ai_signals, ai_weights, ai_score Advanced Keyword Generator: upgraded algorithm for admin keyword suggestions Replaced TF-IDF with BM25 term weighting Added NPMI (fixed probability base) and Log-Likelihood Ratio (Dunning) for collocation strength Generates bigrams and trigrams for richer, more specific keyword suggestions Cross-document frequency penalty down-ranks phrases that are too generic across the site MMR (Maximal Marginal Relevance) selection ensures diverse, non-redundant final keywords Title-only source: clean signal, no excerpt noise, works reliably across all site types Unicode-safe, locale-aware stop words (Vietnamese & English), and soft fallback mode 404 Smart Redirect Added “Auto Redirect 404 to Best Match” mode driven by Init Live Search scoring Fully respects “Post Types to Include” settings Uses unified resolver + filters for extensible post-type handling Safety checks to avoid loops, invalid targets, and cross-type mismatches Developer Filters Expansion New filters added for AI related posts and keyword signals Complete list now includes over 20 filters (*_fallback, *_post_ids, *_results, *_weights, *_commands, etc.) Developers can hook into candidate pools, signal scores, and schema output with fine-grained control Performance Optimizations Smarter candidate pooling for related posts (recent + context-based) Pre-cached scoring loop for AI signals to minimize queries Safer regex handling in keyword processing to avoid PCRE errors Reduced memory footprint in bigram statistics without sacrificing accuracy Backward Compatible Enhancements [init_live_search_related_posts] and [init_live_search_related_ai] now share the same rendering pipeline Existing templates, schema, and CSS continue to work without modification Auto insert related posts still works and can be switched to AI mode via shortcode override Features Packed with everything a modern live search needs — and more: Live search via REST API (no admin-ajax, no jQuery) NEW: Block Editor (Gutenberg) blocks — Live Search Box, Related Posts, and AI Related Posts — under their own block category, each with a live server-side preview in the editor NEW: Abilities API support (WordPress 6.9+) — search and related posts exposed as discoverable, executable abilities via wp_get_abilities() and the wp-abilities/v1 REST namespace NEW: Optional MySQL FULLTEXT search index — faster Title/Excerpt/Content matching than LIKE queries on the built-in database search, auto-builds in the background NEW: Optional Meilisearch integration — typo-tolerant, relevance-ranked external search with automatic fallback to local DB search Smart tag-aware search mode (title + tag match) SEO metadata support: Yoast, Rank Math, AIOSEO, SEOPress, TSF ACF field matching and customizable filters Synonym expansion with fallback scoring logic Slash commands: /recent, /popular, /tag, /id, /sku, /price, /coupon, etc. WooCommerce support: search by product, SKU, brand, attribute, variation, coupon Clean modal UI with keyboard navigation (↑ ↓ Enter Esc) Optional voice input (SpeechRecognition) Tooltip Quick Search (select text to trigger) Favorites system via heart icon or /fav commands Infinite scroll and smart category filter (no extra API) Deep linking: ?modal=search&term=... New [init_live_search] shortcode: insert input or icon anywhere UI presets: default, fullscreen, topbar — with full CSS override Local caching + analytics (CSV export, no personal data) Developer-ready: custom slash commands, REST filters, JS hooks Dark Mode Support Enable dark mode for the modal by either: Adding the dark class: document.querySelector(‘#ils-modal’)?.classList.add(‘dark’); Or using a global config: window.InitPluginSuiteLiveSearchConfig = { theme: ‘dark’ }; Options: dark, light, auto Admin Settings Choose post types to include in search Enable an optional MySQL FULLTEXT search index for faster Title/Excerpt/Content matching, with automatic background indexing Connect an optional Meilisearch server (Host, Index, Search/Admin keys, timeout, one-click connection test, one-click Reindex Now) Configure modal triggers (input focus, triple click, Ctrl+/) Enable slash commands (e.g. /recent, /tag, /id) Enable support for + and - keyword operators (must-have, must-not-have) Set default slash command to run on modal open (only if slash is enabled) Set debounce time and max results Choose search mode (title-only, tag-aware, full content) Define custom ACF fields to include in search (optional) Enable Search in SEO Metadata (Yoast, Rank Math, etc.) Toggle excerpt display below each result (1-line contextual snippet) Toggle fallback logic (bigram/trim) Enable synonym expansion and manage synonym mappings (JSON editor) Enable Search Analytics to log queries (no personal data stored) Set max words for tooltip search Enable voice input (SpeechRecognition API) Enable result caching (localStorage) Choose frontend UI style (default, fullscreen, or topbar) Allow theme override via init-live-search/style.css Automatically insert related posts after content or comments (optional) Option to disable all built-in CSS completely Add default UTM parameter to result links Define or auto-generate keyword suggestions FULLTEXT Search Index (Optional) The built-in database search normally uses LIKE '%term%' queries, which can’t use a regular index and get slow on sites with a large number of posts. Tick FULLTEXT Search Index (Settings → Init Live Search → General) to sync Title/Excerpt/Content into a dedicated indexed table (your wp_posts table is untouched) and match with MySQL’s MATCH() AGAINST() instead. Once enabled, the index builds itself automatically in the background via WP-Cron — no SSH/WP-CLI needed — or you can speed things up with wp init-live-search fulltext-reindex. If your server doesn’t support FULLTEXT, or the index isn’t built yet, the plugin simply keeps using the standard LIKE-based search — nothing ever breaks. Tag search, SEO metadata, ACF fields, synonyms, and the +/- operators all keep working the same either way. Meilisearch Integration (Optional) Init Live Search works great out of the box with zero setup — the built-in database search handles everything by default. But if you want faster, typo-tolerant, relevance-ranked search at scale, you can connect your own Meilisearch instance in a few minutes. How it works: Install and run Meilisearch yourself — self-hosted (a small VPS is plenty for most blogs) or via Meilisearch Cloud. This plugin does not host or manage a server for you. Go to Settings → Init Live Search → Meilisearch, enter your Host URL, Index Name, and a search-only API key, then enable the integration. Index your existing published content either by running wp init-live-search meili-reindex via WP-CLI, or by clicking the “Reindex Now” button right on the Meilisearch settings tab (handy if you don’t have WP-CLI/SSH access) — it runs in the background (~200 posts every 5 seconds) with a live progress status. That’s it — search requests are now answered by Meilisearch. New, updated, and deleted posts stay in sync automatically. Built for safety, not lock-in: If Meilisearch is disabled, unconfigured, or fails to respond (timeout, wrong key, server down), the plugin automatically and silently falls back to the local database search — visitors never see a broken search box. Reindexing (via the button or WP-CLI) is always manual-only, and auto-stops with a clear error after 3 consecutive failed batches instead of retrying forever. Your sensitive indexing key can live in wp-config.php (INIT_LIVE_SEARCH_MEILI_ADMIN_KEY) instead of the database. Turn it off any time — nothing about your site’s core search behavior depends on Meilisearch being present. Keyboard Shortcuts Arrow Up / Down — navigate between results Arrow Right — add selected result to favorites (if not already added) Arrow Left — remove selected result from favorites Enter — open selected result or submit Escape — close modal and reset state Slash (/) — start a command instantly (e.g., /recent, /id 123) Developer Reference: Shortcodes, Filters, and Hooks Shortcodes [init_live_search] Display a search icon or input anywhere that opens the Init Live Search modal. Attributes: – type: icon (default) or input – choose between a clickable icon or a search box – placeholder: (optional) text inside the input if type="input" – label: (optional) adds a label next to the icon if type="icon" – class: (optional) add custom classes like dark, my-style, etc. – stroke_width: (optional) set the stroke width for the search icon (default: 1) – radius: (optional) override the border radius of the input form (default: 9999px from CSS; only applied if value differs) [init_live_search_related_posts] Display a list of related posts (static HTML) based on post title or keyword, optimized for SEO and fully themable. Attributes: – id: (optional) the post ID to find related posts for (defaults to current post) – count: (optional) number of posts to display (default: 5) – keyword: (optional) override the keyword used for finding related posts – template: (optional) layout template to use — default, grid, classic, compact, thumbright – css: 1 (default) or 0 – disable default CSS if you want to fully style it yourself – schema: 1 (default) or 0 – disable JSON-LD ItemList output for SEO schema [init_live_search_related_ai] Display a list of AI-powered related posts using multi-signal scoring (tags, series, title bigrams, same_keyword via ACF, category, views, comments, freshness). Uses the same templates as [init_live_search_related_posts], so no extra styling is required. Attributes: – id: (optional) the post ID to find related posts for (defaults to current post) – count: (optional) number of posts to display (default: 5) – post_type: (optional) restrict results to one or more post types (default: post) – template: (optional) layout template to use — default, grid, classic, compact, thumbright – css: 1 (default) or 0 – disable default CSS if you want to fully style it yourself – schema: 1 (default) or 0 – disable JSON-LD ItemList output for SEO schema Filters for Developers Init Live Search includes many filters to help developers customize behavior and output at various stages of the search flow. Full documentation (with code samples & advanced usage): Using Filters in Init Live Search Popular filters init_plugin_suite_live_search_enable_fallback Enable or disable fallback logic when few results are found. init_plugin_suite_live_search_post_ids Customize the array of post IDs returned from the query. init_plugin_suite_live_search_result_item Modify each result item before it’s sent in the response. init_plugin_suite_live_search_results Filter the final array of results before being returned. init_plugin_suite_live_search_query_args Modify WP_Query arguments for different commands. init_plugin_suite_live_search_ai_weights Adjust AI scoring weights for related posts. (…and more in the full docs) REST API Endpoints Fully documented, lightweight, and API-first endpoints. Ideal for headless or decoupled builds. All endpoints are under namespace: initlise/v1 Full documentation (with examples & parameters): REST API Endpoints in Init Live Search Popular endpoints /search?term=example Standard search query (uses plugin settings like post types, search mode, fallback…). /id/{id} Fetch a post by ID (returns permalink). /recent Fetch the most recent posts. /tax?taxonomy=category&term=slug-or-id Fetch posts by taxonomy (category, tag, or custom). /related?title=page-title&exclude=ID Fetch posts related to the current page title. /product?... Fetch WooCommerce products with flexible query parameters. (…and more in the full docs) License This plugin is licensed under the GPLv2 or later. You are free to use, modify, and distribute it under the same license.