=== Zyonix Related Posts ===
Contributors: zyonixdigital
Tags: related posts, related content, similar posts, post recommendations, content discovery
Requires at least: 5.0
Tested up to: 6.7
Stable tag: 1.0.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show related posts after your content. Supports grid/list layouts, excerpt, date, read time, Load More, shortcode and widget.

== Description ==

**Zyonix Related Posts** automatically shows relevant posts to your readers at the end of any post or page — helping you reduce bounce rates and keep visitors engaged longer.

= Key Features =

* **Smart Matching** — Find related posts by Category, Tag, Author, or any combination.
* **Grid & List Layouts** — Choose the layout that fits your theme.
* **Post Meta** — Optionally show publish date and estimated reading time.
* **Excerpt Support** — Show a short excerpt beneath each related post title.
* **AJAX Load More** — Let visitors load more related posts without a page reload.
* **Shortcode** — Use `[zyonrp_related_posts]` anywhere in your content or widgets.
* **Widget Support** — Drop the widget into any sidebar or footer area.
* **Order By** — Sort by Latest, Most Commented, or Random.
* **Thumbnail Size** — Choose from Thumbnail, Medium, Medium Large, or Large.
* **Open in New Tab** — Optionally open all related post links in a new tab.
* **Auto-Append Toggle** — Disable auto-appending to content and use the shortcode instead.
* **Multiple Post Types** — Works with Posts, Pages, and any custom post type.
* **Fully Sanitized & Escaped** — Built with WordPress security best practices throughout.

= Shortcode Usage =

Basic usage:
`[zyonrp_related_posts]`

With options:
`[zyonrp_related_posts count="3" layout="list" title="You May Also Like"]`

= Requirements =
* WordPress 5.0+
* PHP 7.4+

== Installation ==

1. Upload the `zyonix-related-posts` folder to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Go to **Settings → Related Posts** to configure the plugin.
4. That's it! Related posts will now appear automatically after your post content.

== Frequently Asked Questions ==

= Related posts are not showing up. What should I do? =

Go to **Settings → Related Posts** and make sure:
1. The correct Post Types are checked under "Show On Post Types".
2. At least one option is checked under "Matching Logic" (Category, Tag, or Author).
3. "Auto-append to Content" is enabled.

= Can I show related posts manually instead of automatically? =

Yes! Disable "Auto-append to Content" in the settings, then place the shortcode `[zyonrp_related_posts]` wherever you want them to appear.

= Can I style the related posts section myself? =

Yes. Add styles to your theme's stylesheet targeting `.zyonrp-related-posts`.

= Does it support custom post types? =

Yes. All public post types are listed in the "Show On Post Types" setting so you can enable related posts for any of them.

= What does the shortcode support? =

`[zyonrp_related_posts count="5" layout="grid" title="Related Posts"]`

All three attributes are optional and fall back to your global settings.

== Screenshots ==

1. The related posts section displayed on a post — Grid layout.
2. List layout with excerpt, date, and read time enabled.
3. The Settings page — Display Settings panel.
4. The Settings page — Content & Meta toggles.
5. The Settings page — Matching Logic panel.

== Changelog ==

= 1.0.0 =
* Initial release.
* Grid and List layout options.
* Excerpt, publish date, and estimated read time display options.
* AJAX-powered "Load More" button.
* Shortcode `[zyonrp_related_posts]` with count, layout, and title attributes.
* WordPress Widget support.
* Order By option (Latest, Most Commented, Random).
* Thumbnail size selector.
* Open links in new tab option.
* Auto-append to content toggle.
* Default options set on plugin activation.
* Full input sanitization, validation, and escaping per WordPress coding standards.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
