=== IGIT Related Posts and Post Nudges ===
Contributors: phpaddicted
Donate link: https://php-freelancer.in/igit-related-posts-and-post-nudges-wordpress-plugin/
Tags: related posts, gutenberg block, elementor, woocommerce, post nudges
Requires at least: 6.1
Tested up to: 7.0
Stable tag: 5.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show related posts with thumbnails and post nudges. Six layouts, Gutenberg block, Elementor widget, shortcode, and smart content matching.

== Description ==

[Plugin Home Page](https://php-freelancer.in/igit-related-posts-and-post-nudges-wordpress-plugin/) | [Support](https://php-freelancer.in/igit-related-posts-and-post-nudges-wordpress-plugin/)

**IGIT Related Posts With Thumb** automatically shows related posts after your content using thumbnails, multiple layouts, and smart relation methods. It is lightweight, highly configurable, and developer-friendly.

Looking for even more power? The **[Pro add-on](https://php-freelancer.in/igit-related-posts-and-post-nudges-wordpress-plugin/)** unlocks Analytics, Async Loading, Post Nudges, and Custom Post Type support.

= Free Features =

**Display & Layouts**

* Six layouts: **Grid**, **List**, **Compact**, **Masonry**, **Carousel**, and **Chip/Pill**
* Responsive grid columns — configure desktop, tablet, and mobile breakpoints independently
* Configurable heading text, heading level (H2–H4), and optional show/hide
* Show or hide: thumbnail, title, excerpt (with word-length control), publish date, estimated reading time, comment count, and category badge
* Open links in same tab or new tab with optional rel="nofollow"
* Custom CSS field for per-site style tweaks
* Custom "no related posts" message

**Relation Methods**

* **Category** – posts sharing the same category
* **Tag** – posts sharing common tags
* **Both** – category AND tag combined (recommended)
* **Full-text** – content similarity search
* **Author** – posts by the same author
* **Series** – custom igit_series taxonomy grouping

**Query Control**

* Post count per widget/block/global (1–20)
* Exclude specific categories or post IDs
* Minimum shared-term overlap threshold (1–5)
* Maximum post age filter (days)
* Rotate/shuffle results on every page load
* Fallback when no match found: Recent, Popular, Random, or None

**Thumbnails**

* Uses WordPress native image sizes — no third-party resizing library
* Automatic image discovery: featured image → content scan → attachment → custom placeholder
* Upload a custom default placeholder image

**Cache**

* Transient-based query cache with configurable TTL (default 12 hours)
* Supports WordPress Object Cache when available
* WP-CLI command to flush cache per-post or globally

**Placement Options**

* Auto-append after post content
* [igit_related_posts] shortcode with count, layout, and relate_by attributes
* **Gutenberg Block** – "Related Posts" block with per-block post count and layout
* **Elementor Widget** – per-widget control of all display settings
* **Classic Widget** – sidebar widget with title, post count, and layout
* **Per-post Metabox** – override count, layout, relation method, and pin specific posts per post

**Developer Friendly**

* Theme template override: place igit-rpwt/template.php in your theme
* Filters: igit_rpwt_query_args, igit_rpwt_posts_filtered, igit_rpwt_template_file, igit_rpwt_output
* WP-CLI: wp igit-rpwt flush-cache
* REST-API-exposed igit_series custom taxonomy

= Pro Features =

**Analytics** — Track every related post click. View top-performing posts, daily totals, and breakdowns by source (widget vs. nudge) from your WP dashboard. Configurable data retention with automatic daily cleanup.

**Async Loading** — Load related posts via AJAX after the page renders, improving TTFB on cached pages without sacrificing content.

**Post Nudges** — Floating notification cards that surface a relevant post to keep visitors engaged. Choose from Compact, Card, and Minimal styles; position bottom-right/left or top-right/left; trigger on page load, 50% scroll, or exit intent; configure auto-dismiss duration and show interval. Animations include slide, fade, bounce, flip, zoom, and more.

**Custom Post Type Support** — Extend related posts to any registered public post type.

[Get the Pro add-on →](https://php-freelancer.in/igit-related-posts-and-post-nudges-wordpress-plugin/)


== Installation ==

1. Upload the igit-related-posts-with-thumb-images-after-posts folder to /wp-content/plugins/.
2. Activate the plugin through the Plugins screen in WordPress.
3. Go to Related Posts and then settings from Menu to configure display, query, thumbnail, and cache options.
4. Optionally override settings per-post using the Related Posts metabox on the post edit screen.

== Frequently Asked Questions ==

= How does the plugin find related posts? =
It matches by category, tag, both, full-text content similarity, author, or a custom Series taxonomy — your choice per global setting or per-post override.

= How does image discovery work? =
The plugin checks for a featured image first, then scans post content for the first embedded image, then looks for an attached image, and finally falls back to a configurable default placeholder.

= Can I override the template? =
Yes. Copy templates/default.php from the plugin to {your-theme}/igit-rpwt/template.php and customise freely.

= Can I place related posts manually? =
Yes. Use the [igit_related_posts] shortcode, the Gutenberg block, the Elementor widget, or the Classic widget.

= How do I flush the related posts cache? =
Go to Settings → Related Posts → Cache Settings and set TTL to 0, or use WP-CLI: wp igit-rpwt flush-cache.

= What does the Pro add-on include? =
Analytics, Async Loading, Post Nudges, and Custom Post Type support. See: https://php-freelancer.in/igit-related-posts-and-post-nudges-wordpress-plugin/


== Screenshots ==

1. Related posts in Grid layout
2. Admin settings — Display tab
3. Admin settings — Query tab
4. Per-post metabox override
5. Analytics dashboard (Pro)
6. Post Nudge in Card style (Pro)

== Changelog ==

= 5.0 =
* Complete plugin rewrite — modern PHP, zero legacy dependencies.
* Six layouts: Grid, List, Compact, Masonry, Carousel, Chip.
* Responsive grid columns: configure desktop, tablet, and mobile column counts independently.
* Gutenberg block with per-block post count and layout.
* Elementor widget with full per-instance controls.
* Per-post metabox: override count, layout, relation method, and pin specific posts.
* Six relation methods: Category, Tag, Both, Full-text, Author, Series.
* Custom igit_series taxonomy for series grouping.
* Minimum term overlap, max post age, and post ID exclusion filters.
* Rotate/shuffle results per page load.
* Fallback modes: Recent, Popular, Random, None.
* Transient cache with configurable TTL; WP Object Cache support.
* Theme template override via {theme}/igit-rpwt/template.php.
* Developer filters: igit_rpwt_query_args, igit_rpwt_posts_filtered, igit_rpwt_template_file, igit_rpwt_output.
* WP-CLI: wp igit-rpwt flush-cache.
* Freemius integration for Pro licence management.
* Optional query time display for debugging (off by default).
* Removed timthumb dependency entirely.
* Full WPCS coding standards compliance.

= 4.5.3 =
* Added option to disable timthumb and hard crop in timthumb.

= 4.5.2 =
* Fixed: could not add media in post/page editor.

= 4.5.1 =
* Added option to upload a custom default placeholder image.

= 4.5 =
* Removed inline CSS; fixed exclude-category logic; improved WordPress compatibility; refreshed default appearance; dynamic thumb height proportional to container.

= 4.4 =
* Updated timthumb to latest version; removed unnecessary files.

= 4.3 =
* Updated timthumb to latest version; added Facebook like button.

= 4.2 =
* GPL3 compatibility; removed credit link.

= 4.1 =
* Updated to timthumb 2.8.10.

= 4.0 =
* Updated to latest timthumb.

= 3.9.8 =
* Fixed timthumb security vulnerability.

= 3.9.7 =
* New relation logic: match by categories and tags; fallback to random when post has no terms.

= 3.9.6 =
* Bug fix: timthumb file upgrade.

= 3.9.5 =
* Bug fix: title CSS breaking related posts layout.

= 3.9.4 =
* Bug fix: title not shown by default after upgrade.

= 3.9.3 =
* Added options to display full post title and control number of characters shown.

= 3.9.2 =
* Fixed CSS hover state on related posts.

= 3.9.1 =
* Added cache folder to fix image display on some servers.

= 3.9 =
* Fixed broken layout caused by remote-hosted images; replaced with default placeholder.

= 3.8 =
* Refreshed look and feel; improved content image scanning logic.

= 3.7 =
* Fixed PHP warning: array_key_exists() incorrect argument type.

= 3.6 =
* Fixed fatal error on themes that do not support featured images.

= 3.5 =
* New image discovery order: custom field → featured image → content scan → attachment → default image. Added custom no-related-posts message field.

= 3.4 =
* Added font-family and font-size controls.

= 3.3 =
* Added option to show/hide title in horizontal style.

= 3.2 =
* Auto-adjust height when thumbnail is hidden.

= 3.1 =
* Reverted tooltip (3.0) due to major compatibility issues.

= 3.0 =
* Added hover tooltip showing post excerpt.

= 2.1.4 =
* Internal function improvements.

= 2.1.3 =
* Made entire related post card clickable, not just the image and title link.

= 2.1.2 =
* Fixed: password-protected posts appearing in related posts.

= 2.1.1 =
* Related posts now vary on each page load.

= 2.1 =
* Additional features and stylesheet added.

= 2.0 =
* Colour customisation options added.

= 1.9 =
* Fixed: checkbox data not saving.

= 1.8 =
* Improved related posts algorithm; fixed no-image bug.

= 1.7 =
* Improved handling of remote-hosted images; refined algorithm; exclude categories fix.

= 1.6 =
* Remote-hosted images replaced with placeholder to prevent bandwidth theft.

= 1.5 =
* Fixed in_array argument bug.

= 1.4 =
* Initial stable release.
Exclude Categories Feature added.

= 1.3. =
I got so many mail from users that it is always showing No related posts, So I have chnaged related posts algorithm So now if it not find related posts by content and title then it will try to find related posts by tags and if it will not find related posts by tags then it will show posts randomly.

= 1.2. =
Heading text added in admin and also first time plugin not working problem solved.

= 1.1. =
Image Not showing problem and also related posts width problem solved.

= 1.0. =
- This is the very first release of the IGIT Related Posts With Thumb After Posts plugin. The code base isn�t all that pretty hence the 
possibility of many bugs.<br />

- Users will be informed every time the plugin upgrades.<br />

== Screenshots ==
You can Check Screen Shots from Here :<br />
http://www.hackingethics.com/blog/wordpress-plugins/igit-related-posts-with-thumb-image-after-posts/ <br />

== Upgrade Notice ==

= 5.0 =
Major rewrite — six layout styles, Gutenberg block, Elementor widget, full-text matching, series taxonomy, per-post overrides, and a completely new admin UI. Timthumb removed; all thumbnails now use native WordPress image APIs. Security hardened: all inputs sanitised, all outputs escaped, nonce and capability checks on every admin action. Upgrade strongly recommended.